1

我已将身份验证模式从“表单”更改为“Windows”,它看起来像这样:

<authentication mode="Windows"/>
    <identity impersonate="true"/>
    <authorization>
      <deny users="?"/>
    </authorization>

我这样做的原因是在 IIS 上检索当前登录的用户。但是,每次我调试我的项目时,我总是得到这个消息:

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /login.aspx

我不知道为什么它要求去 login.aspx 你能帮我吗?谢谢!

4

2 回答 2

0

检查您的 IIS 设置以确保您启用了 Windows 身份验证,并禁用了匿名身份验证。您的配置禁用匿名用户,因此如果启用匿名身份验证,它将使用匿名帐户登录。

于 2013-09-19T17:40:47.273 回答
0

如果您从选择 Internet 应用程序开始,则需要从项目中删除对 Webmatrix dll 的引用。

于 2015-01-21T07:18:13.200 回答