[英]getting webservice's ApplicationPool
I have some web service running on my computer how can I get by webservice name it's application pool settings ? 我在我的计算机上运行了一些Web服务如何通过webservice名称获取它的应用程序池设置?
I just need to change programmatic way it's "Enable 32 bit Applications" flag. 我只需要改变编程方式就是“启用32位应用程序”标志。
I am talking about IIS7. 我在谈论IIS7。
You can use the Microsoft.Web.Administration assembly in order to get all sorts of information about your IIS setup. 您可以使用Microsoft.Web.Administration组件来获取有关IIS设置的各种信息。 Here is a link to an article about it.
这是一篇关于它的文章的链接。 In your case it would look something like this:
在你的情况下,它看起来像这样:
ServerManager manager = new ServerManager();
manager.ApplicationPools[
manager.Sites["yoursite"].Applications["servicePath"].ApplicationPoolName].
Enable32BitAppOnWin64 = true;
That ought to do it. 应该这样做。
看一下Microsoft.Web.Administration
命名空间 - ServerManager
类是一个很好的起点,可以访问所有网站,应用程序池等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.