我有一個ASP.NET Web應用程序在我的web.config文件的部分看起來像下面ASP.NET設置認證通過的parameters.xml
<security>
<authentication>
<windowsAuthentication enabled="true">
<providers>
<clear />
<add value="NTLM" />
<add value="Negotiate" />
</providers>
</windowsAuthentication>
<anonymousAuthentication enabled="false" />
</authentication>
</security>
在另一方面,我配置了的parameters.xml文件(基於https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/web-deployment-in-the-enterprise/configuring-parameters-for-web-package-deployment)根據我的環境定義不同的設置以及不同的< _APPNAME>。 < _ENVIRONMENT> .SetParameters.xml文件。
我想弄清楚如何通過Parameters.xml定義不同的身份驗證設置?
- 在環境A,我需要有windowsAuthentication啓用= 「真」 (和anonymousAuthentication啓用= 「假」)
- 在環境B,我需要有anonymousAuthentication
啓用=」 true「(和windowsAuthentication enabled =」false「)