匿名身份validation<anonymousAuthentication> / 403 – 禁止:访问被拒绝

我正在使用Windows Server 2008 R2和IIS 7.5

我第一次部署我的应用程序到该服务器,我得到以下错误;

403 – 禁止:访问被拒绝。

您无权使用您提供的凭据查看此目录或页面。

所以我做了一点search,我认为我应该configuration匿名身份validation<anonymousAuthentication>但我不知道如何做到这一点。 在下面的链接上有明确的解释,但不确定这是否是解决我的问题的正确方法;

http://www.iis.net/ConfigReference/system.webServer/security/authentication/anonymousAuthentication

如果这是问题,我想我应该把类似的代码块如下;

 <security> <authentication> <anonymousAuthentication userName="User1" password="[enc:AesProvider:57686f6120447564652c2049495320526f636b73:enc]" /> </authentication> </security> 

如果是这种情况,我应该如何提供这个代码?

我应该使用AppCmd.exe与PowerShell?

编辑好的,我继续探索和新的问题popup在我的头上;

  1. 据我所知,我需要在那里设置机器的用户名和密码。 但我应该在那里设置什么样的用户? 用户应该在哪里访问(哪些文件夹)?
  2. 我可以添加我的web.config文件中的configuration,或者我应该提供这个applicationHost.config?

用你的applicationHost.configreplace<security> </security>

 <system.webServer> <security> <authentication> <anonymousAuthentication enabled="true" /> </authentication> </security> </system.webServer> 

您应该能够使用链接从IISpipe理器configuration相同的