我正在使用Microsoft. Web. Administration以编程方式在选定的父网站下创建IIS Web应用程序。我可以使用下面的代码很好地创建应用程序,但我不确定如何通过Application变量更改应用程序的此特定方面(Cookie超时值)。
Microsoft.Web.Administration.Application new_parent_app = target_trial_site.Applications.Add("/Test", new_app_path);
new_parent_app.ApplicationPoolName = "DefaultAppPool";
new_parent_app.SetAttributeValue("system.web/sessionState/timeout", 720); // what should go here? or is it a different function like SetMetadata?
下面是我尝试在IIS UI中更改的值的图片,以供参考:
这里的Microsoft's developer site也不清楚我会如何做。
提前感谢您的帮助。
1条答案
按热度按时间c2e8gylq1#
必须通过服务器/应用程序/部分/设置层次结构,