开发者

getting webservice's ApplicationPool

I have some web开发者_StackOverflow中文版 service running on my computer how can I get by webservice name it's application pool settings ?

I just need to change programmatic way it's "Enable 32 bit Applications" flag.

I am talking about IIS7.


You can use the Microsoft.Web.Administration assembly in order to get all sorts of information about your IIS setup. 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.


Take a look at the Microsoft.Web.Administration namespace - the ServerManager class is a good starting point, giving you access to all websites, application pools etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜