密码保护ASP.NET Web应用程序在IIS 7.5 [英] Password protect ASP.NET web application in IIS 7.5

查看:198
本文介绍了密码保护ASP.NET Web应用程序在IIS 7.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用IIS 7.5在Windows 7上为我的asp.net网站用于测试目的。为了阻止随机的人看我的网站,我希望IIS需要用户名和密码,然后它会提供什么。

我曾尝试禁用匿名身份验证和应用程序启用Windows身份验证,但是当我输入我的窗户,它的凭据不起作用。

有人可以解释这样做的一个简单的方法?


解决方案

您需要基本身份验证:


  

      
  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.   

  
  


  
  

从<带引号的href=\"http://www.iis.net/ConfigReference/system.webServer/security/authentication/basicAuthentication#004\">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

这篇关于密码保护ASP.NET Web应用程序在IIS 7.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆