1

我的 asp.net mvc4 应用程序出现授权错误。我的机器的帐户管理员是这个

行政

我的会话属性:

瑟

在我的 web.config 文件中,我放了这个片段:

 <authentication mode="Windows" />
    <authorization>
      <allow  users = "Lamloumi" />
      <deny users="?"/>
    </authorization>

当我启动应用程序时,我无法访问它。

这个错误的原因是什么?我该如何修复我的代码?

4

2 回答 2

1

尝试使用这个:

<configuration>
<authentication mode="Windows" />
  <system.web>
    <authorization>
      <allow  users = "Lamloumi" />
      <deny users="?"/>
    </authorization>
  </system.web>
</configuration>
于 2013-09-11T10:35:48.247 回答
1

尝试将域名添加到allow

 <allow users="DomainName\UserName" />
于 2013-09-11T11:17:27.397 回答