no need for coding, in Internet Service Manager, right click on your page to open Properties page, on File Security tab, click on the first Edit button, uncheck Anonymous access, check Integrated Windows authentication

解决方案 »

  1.   

    我的Web应用程序本来就是集成Windows认证的。我现在是想要以另外一个用户登录系统。(在不注销登录的情况下)
      比如点击页面上‘Logon as different User'按钮,IE应该弹出Windows的login窗口。就是不知道怎样实现在不注销Windows的情况下以另外一个用户的身份登录我的Web系统?
      

  2.   

    ...mmm, this is interesting, you might want to try to send back a header like the following, although I am not sure if it will work:Response.StatusCode = 401;
    Response.StatusDescription = "Unauthorized";
    Response.AddHeader ("WWW-Authenticate","NTLM");
    Response.End();If the event you are describing is an regular event, you might want to consider to use Forms based authentication method and use impersonation on the server side
      

  3.   

    你在IIS中设置了使用Windows集成认证了吗?如果没有就设置一下,应该是可以的。