通过脚本启用IIS自动启动和STARTMODE [英] Enabling IIS AutoStart and StartMode through scripting

查看:1556
本文介绍了通过脚本启用IIS自动启动和STARTMODE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的要启用启动脚本这些IIS设置。在code这样一个答案存在这里:自动启动在Azure上WebRole 一个WCF。我不喜欢把那种IIS调整在code。于是,我找到了这些命令:

I really want to enable these IIS settings in a startup script. An answer for doing this in code exists here: AutoStart a WCF on Azure WebRole. I dislike putting that sort of IIS tweaking in code. So I found these commands:

%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.autoStart:true
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.startMode:AlwaysRunning

他们似乎正是我想要逻辑,但不具备所需的影响。我通过部署一个ASP.NET WCF RESTful服务。当远程访问到我的Azure实例CloudService我可以IISMgr该STARTMODE设置为AlwaysRunning看,但我不知道在IIS UI找到自动启动设置。

They appear to be exactly what I want logically but do not have the desired affect. I'm deploying a WCF RESTful service via ASP.NET. When remoting into my Azure CloudService instances I can see in IISMgr that StartMode is set to AlwaysRunning, but I don't know where in the IIS UI to find the AutoStart setting.

任何人都熟悉IIS和脚本可以附和什么我可能是做错了?

Can anyone familiar with IIS and scripting chime in on what I might be doing wrong?

推荐答案

要回答你在哪里可以找到在IIS用户界面的自动开始设置问题,因为你设置的默认值,你可以在这里找到它的用户界面:

To answer your question about where to find the autoStart setting in IIS UI, since you are setting the default, you can find it here in the UI:

1)选择左侧视图应用程序池。结果
2)在行动在右窗格中选择设置应用程序池默认值
3)寻找启动自动。这是用于自动启动的设置。结果
4)确保您的设置是正确的。

1) Select "application pools" on left side view.
2) In actions pane on the right select "Set Application Pool Defaults" 3) Look for "Start Automatically". That is the setting for "autoStart".
4) Ensure your setting is correct.

但另一个要考虑的,是你刚才设置的默认值。你需要确保你的应用程序在运行的特定应用程序池,设置是否正确。您可以通过选择特定的应用程序池验证,然后选择高级设置,然后再次验证您的设置是否正确。如果设置不正确,请考虑更改你的脚本来指定有问题的应用程序池。

Another thing to consider however, is you just set the defaults. You need to ensure that the specific application pool your application is running in, is set correctly. You can verify that by selecting the specific application pool and then choose "Advance Settings" and once again verify your settings are correctly set. If they are NOT set correctly, consider changing your script to specify the application pool in question.

这篇关于通过脚本启用IIS自动启动和STARTMODE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆