且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

密码保护ASP.NET Web应用程序在IIS 7.5

更新时间:2022-11-04 19:52:59

您需要基本身份验证:


  

      
  1. 打开Internet信息服务(IIS)管理器:


      
      

        
    • 如果您使用的是Windows Server 2008或Windows Server 2008 R2的:


        
        

          

      在任务栏上,单击开始,指向管理工具,然后单击Internet Information Services(IIS)管理器。


        块引用>

    •   
    • 如果您使用的是Windows Vista或Windows 7:


        
        

          

      在任务栏上,单击开始,然后单击控制面板。
          双击管理工具,然后双击Internet信息服务(IIS)管理器。


        块引用>

    •   

  2.   
  3. 在连接窗格中,展开服务器名称,展开网站,
      然后单击您想要的网站,应用程序或Web服务
      启用基本身份验证。


  4.   
  5. 滚动到安全部分
      主页窗格,然后双击身份验证。

  6.   
  7. 在认证
      窗格中,选择基本身份验证,然后在操作窗格中,
      单击启用。

  8.   
  9. 在身份验证窗格中,选择匿名
      身份验证,然后单击禁用在操作窗格中。

  10.   

  
  

密码保护ASP.NET Web应用程序在IIS 7.5


  
  

从Basic验证如何


块引用>

I use IIS 7.5 on windows 7 to serve my asp.net websites for testing purposes. In order to stop random people viewing my websites I want IIS to require a username and password before it will serve anything.

I have tried disabling Anonymous Authentication and enabling Windows Authentication on the application but when I type my windows credentials in it doesn't work.

Can somebody explain a simple way of doing this?

You need "Basic Authentication":

  1. Open Internet Information Services (IIS) Manager:

    • If you are using Windows Server 2008 or Windows Server 2008 R2:

      On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

    • If you are using Windows Vista or Windows 7:

      On the taskbar, click Start, and then click Control Panel. Double-click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.

  2. In the Connections pane, expand the server name, expand Sites, and then click the site, application or Web service for which you want to enable basic authentication.

  3. Scroll to the Security section in the Home pane, and then double-click Authentication.
  4. In the Authentication pane, select Basic Authentication, and then, in the Actions pane, click Enable.
  5. In the Authentication pane, select Anonymous Authentication, and then click Disable in the Actions pane.

quoted from Basic Authentication How To