我正在尝试使用以下代码对 IIS7 中的应用程序启用匿名访问:
ConfigurationSection config = server.GetWebConfiguration(webSiteName).GetSection("system.webServer/security/authentication/anonymousAuthentication", "/" + applicationName);
config.OverrideMode = OverrideMode.Allow;
config["enabled"] = true;
但是我收到了这个错误:
Failed: The request is not supported. (Exception from HRESULT: 0x80070032)
如何修改应用程序的匿名访问?
谢谢,ng93