我希望有人能帮我。我有一个通过web配置设置为安全的web服务:
<authentication mode="Windows" />
<authorization>
<allow roles="MET\Web-Admin"/>
<deny users="*"/>
<allow users="MET\JoeUser;MET\JoeSmith"/>
</authorization>此外,在IIS 7 (Windows 2008)中,它具有以下身份验证设置:
Anonymous Authentication:Disabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Disabled
Windows Authentication: Enabled我在IIS7中调用它的匿名站点是:
Anonymous Authentication:Enabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Enabled
Windows Authentication: Disabled在匿名网站中,我通过以下方式调用安全web服务:
moms.momService myMom = new moms.momService();
NetworkCredential netCred = new NetworkCredential(@"username", "password");
strStatus = myMom.createBackupDirectoryAndPrivs(sData);每次我运行它时,它都会以未经授权的形式返回。我已经确保这个用户在网络管理AD组中.我还尝试将用户添加为允许用户,但仍然未经授权。我很确定问题在IIS的某个地方,但不确定还需要检查什么。
顺便说一句,如果我在我的开发框上通过VS2010开发运行匿名站点,并使用上面的代码调用安全站点,它可以正常工作。这就是为什么我正在考虑PROD服务器上的IIS。
任何帮助都是非常感谢的。提前谢谢。
乔..。
发布于 2011-02-01 16:00:25
尝试在“允许”设置之后移动“拒绝”设置,因为这些设置是按照自上而下的顺序处理的:
<allow roles="MET\Web-Admin"/>
<allow users="MET\JoeUser;MET\JoeSmith"/>
<deny users="*"/>https://stackoverflow.com/questions/4864205
复制相似问题