Windows身份验证和完整访问页面

时间:2016-02-19 10:43:33

标签: c# authentication webforms web-config windows-authentication

我在我的应用程序(Web表单)中使用Windows身份验证,我正在尝试为所有用户创建一个401错误的页面(已验证或未验证)。 我的web.config文件类似于:

<authentication mode="Windows"/>
.....
<location path="pageFor401errors.aspx">
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>

当我在localhost上运行应用程序时,一切都按预期工作,但是当我在远程服务器上发布和部署时,我无权再访问该页面(我甚至尝试通过修改显式访问该页面在浏览器中的URL,我得到一个IIS特定的错误 - 401未经授权)。

有什么建议吗? 顺便说一句,我无法在服务器上配置IIS

0 个答案:

没有答案