密码保护ASP。在IIS 7.5中的NET web应用程序

时间:2022-07-14 03:34:47

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.

我在windows 7上使用IIS 7.5为我的asp.net网站提供测试。为了阻止随便的人浏览我的网站,我希望IIS在提供任何服务之前需要一个用户名和密码。

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.

我曾尝试在应用程序上禁用匿名身份验证和启用Windows身份验证,但当我在其中键入Windows凭据时,它无法工作。

Can somebody explain a simple way of doing this?

有人能解释一种简单的方法吗?

2 个解决方案

#1


15  

You need "Basic Authentication":

你需要“基本身份验证”:

  1. Open Internet Information Services (IIS) Manager:

    开放互联网资讯服务(IIS)经理:

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

      如果您正在使用Windows Server 2008或Windows Server 2008 R2:

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

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

    • If you are using Windows Vista or Windows 7:

      如果你正在使用Windows Vista或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.

      在任务栏上,单击“开始”,然后单击“控制面板”。双击管理工具,然后双击Internet Information Services (IIS)管理器。

  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.

    在Connections窗格中,展开服务器名称、展开站点,然后单击要启用基本身份验证的站点、应用程序或Web服务。

  3. Scroll to the Security section in the Home pane, and then double-click Authentication.
  4. 滚动到Home窗格中的Security部分,然后双击Authentication。
  5. In the Authentication pane, select Basic Authentication, and then, in the Actions pane, click Enable.
  6. 在Authentication窗格中,选择Basic Authentication,然后在Actions窗格中单击Enable。
  7. In the Authentication pane, select Anonymous Authentication, and then click Disable in the Actions pane.
  8. 在“身份验证”窗格中,选择“匿名身份验证”,然后在“操作”窗格中单击“禁用”。

密码保护ASP。在IIS 7.5中的NET web应用程序

quoted from Basic Authentication How To

引用自基本身份验证

#2


0  

With Colin's anwser, don't forget to install "Basic Authentification" feature in the Roles and Features Assistant : "IIS > WebServer > Security"

使用Colin的anwser,不要忘记在角色和特性助理中安装“基本认证”功能:“IIS > WebServer > Security”

#1


15  

You need "Basic Authentication":

你需要“基本身份验证”:

  1. Open Internet Information Services (IIS) Manager:

    开放互联网资讯服务(IIS)经理:

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

      如果您正在使用Windows Server 2008或Windows Server 2008 R2:

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

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

    • If you are using Windows Vista or Windows 7:

      如果你正在使用Windows Vista或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.

      在任务栏上,单击“开始”,然后单击“控制面板”。双击管理工具,然后双击Internet Information Services (IIS)管理器。

  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.

    在Connections窗格中,展开服务器名称、展开站点,然后单击要启用基本身份验证的站点、应用程序或Web服务。

  3. Scroll to the Security section in the Home pane, and then double-click Authentication.
  4. 滚动到Home窗格中的Security部分,然后双击Authentication。
  5. In the Authentication pane, select Basic Authentication, and then, in the Actions pane, click Enable.
  6. 在Authentication窗格中,选择Basic Authentication,然后在Actions窗格中单击Enable。
  7. In the Authentication pane, select Anonymous Authentication, and then click Disable in the Actions pane.
  8. 在“身份验证”窗格中,选择“匿名身份验证”,然后在“操作”窗格中单击“禁用”。

密码保护ASP。在IIS 7.5中的NET web应用程序

quoted from Basic Authentication How To

引用自基本身份验证

#2


0  

With Colin's anwser, don't forget to install "Basic Authentification" feature in the Roles and Features Assistant : "IIS > WebServer > Security"

使用Colin的anwser,不要忘记在角色和特性助理中安装“基本认证”功能:“IIS > WebServer > Security”