asp.net – 在Windows Server 2012的Azure启动任务中安装功能
发布时间:2020-12-16 03:34:46 所属栏目:asp.Net 来源:网络整理
导读:我想在我的Azure部署中安装IP和域限制功能,但我使用的是os版本3(Server 2012),它已经弃用了ServerManageCmd,因此以下代码不起作用: StartupTask.cmd @echo off@echo Installing "IPv4 Address and Domain Restrictions" feature %windir%System32ServerMa
我想在我的Azure部署中安装IP和域限制功能,但我使用的是os版本3(Server 2012),它已经弃用了ServerManageCmd,因此以下代码不起作用:
StartupTask.cmd @echo off @echo Installing "IPv4 Address and Domain Restrictions" feature %windir%System32ServerManagerCmd.exe -install Web-IP-Security @echo Unlocking configuration for "IPv4 Address and Domain Restrictions" feature %windir%system32inetsrvAppCmd.exe unlock config -section:system.webServer/security/ipSecurity ServiceDefinition.csdef partial <Startup> <Task commandLine="StartupStartupTasks.cmd" executionContext="elevated" taskType="simple" /> </Startup> 我相信我需要使用powershell命令,但我在这里有点不太深入.任何人都可以提供2012年此代码的等价物吗? 解决方法
对于那些在家里玩的人来说,这就是答案!
@echo off @echo Installing "IPv4 Address and Domain Restrictions" feature powershell -ExecutionPolicy Unrestricted -command "Install-WindowsFeature Web-IP-Security" @echo Unlocking configuration for "IPv4 Address and Domain Restrictions" feature %windir%system32inetsrvAppCmd.exe unlock config -section:system.webServer/security/ipSecurity (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 应该在ASP.NET MVC应用程序中缓存发生在哪里
- asp.net-mvc – 在每个请求上执行代码
- asp.net-core – 运行Add-Migration时无法加载程序集Micros
- 在Textbox asp.net上使用JQuery DatePicker
- asp.net-mvc – MongoDB,C#,QueryFailure标志不是master而s
- asp.net – 清除表单字段的缓存
- 处理ASP.Net MVC中的过期标题
- asp.net-mvc – 无法在Web服务器上启动调试.调试器无法连接
- asp.net – 这是一个很好的SOA架构吗?
- asp.net-mvc – 使用MVC Web应用程序时Nhibernate的最佳缓存
推荐文章
站长推荐
- asp.net mvc微信项目开发(一)
- asp.net-mvc – 将Serverside MVC与Backbone.js结
- asp.net-mvc – ASP.NET MVC 4 Visual Studio 20
- asp.net-mvc – 没有其他用户的DB上的DbUpdateCo
- 【译】使用Jwt身份认证保护 Asp.Net Core Web Ap
- asp.net-mvc-4 – VS2012 RTM缺少.net 4.5和mvc项
- asp.net – ActionLink 404错误
- asp.net-mvc – ELMAH.axd是可浏览的,但永远不会
- asp.net-mvc – 在MVC Razor中保留数据,而不在请
- asp.net-mvc – Kendo ASP.NET MVC – 索引超出范
热点阅读