windowsAuthentication
全部标签 我有一个使用ActiveDirectory进行身份验证的ASP.NET网站。现在,当经过身份验证的用户打开页面时-他会自动进行身份验证。我遇到了一个问题-当一个未经身份验证的用户(例如,一个没有定义network.automatic-ntlm-auth.trusted-uris属性的MozillaFirefox用户)打开一个页面,IIS发送401响应并提示输入登录名\密码。我想要的是不要提示他输入登录名\密码——只显示一个自定义错误页面。这听起来很简单——经过身份验证的用户获得请求的页面,未经过身份验证的用户被重定向到自定义错误页面。它适用于FormsAuthentication。但是
在C#初始化程序中,如果条件为假,我不想设置属性。像这样:ServerConnectionserverConnection=newServerConnection(){ServerInstance=server,LoginSecure=windowsAuthentication,if(!windowsAuthentication){Login=user,Password=password}};可以吗?怎么办? 最佳答案 这在初始化器中是不可能的;你需要做一个单独的if语句。或者,你可以这样写ServerConnectionserve
当我在IIS中将Windows身份验证启用和匿名设置为禁用时,出现以下错误。Theauthenticationschemesconfiguredonthehost('IntegratedWindowsAuthentication')donotallowthoseconfiguredonthebinding'BasicHttpBinding'('Anonymous').PleaseensurethattheSecurityModeissettoTransportorTransportCredentialOnly.Additionally,thismayberesolvedbychangi