Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Password protect ASP.NET web application in IIS 7.5

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?

like image 561
David Avatar asked Jan 23 '12 16:01

David


People also ask

How do I enable form authentication in IIS?

To configure forms authentication by using the UIOpen IIS Manager and navigate to the level you want to manage. In Features View, double-click Authentication. On the Authentication page, select Forms Authentication. In the Actions pane, click Enable to use Forms authentication with the default settings.

What is pass through authentication IIS?

With passthrough authentication, IIS will attempt to use the actual identity of the user when accessing protected resources. If the user is not authenticated, IIS will use the application pool identity instead.

Is ASP NET secure?

ASP.NET provides that application-level security. It works in conjunction with IIS and the Windows security subsystem to provide a solid foundation for building secure sites. And it builds on what IIS has to offer to make deploying secure sites as easy as possible.


2 Answers

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.

Screenshot of above settings

quoted from Basic Authentication How To

like image 128
Colin Pickard Avatar answered Nov 15 '22 18:11

Colin Pickard


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

like image 20
GGO Avatar answered Nov 15 '22 18:11

GGO