IceT
10-09-2004, 12:36 PM
Is there a way to password protect or protect folder like it is done with .htaccess?
It can be done with Web.config?
thanx in advance!:)
It can be done with Web.config?
thanx in advance!:)
![]() | View Full Version : w2k3, ASP.Net, and password protected folder IceT 10-09-2004, 12:36 PM Is there a way to password protect or protect folder like it is done with .htaccess? It can be done with Web.config? thanx in advance!:) Ricardob 10-09-2004, 06:00 PM ASP.net has four types of authentication: none Windows Forms Passport. obviously option 1 is not what you want, and option 2 neither unless you want to pay a monthly fee to Redmond and have multiple sites that require authentication. Windows authentication is good for intranets. I assume you want to use forms authentication you will have to add something like this to your web.config file <authentication mode="Forms" > <!-- Set authentication mode --> <forms loginUrl="LogIn.aspx" > <!-- Specify a log on form --> </forms> </authentication> <authorization> <deny users="?" /> <!—Deny all unauthenticated users --> </authorization> then you will have to create the LogIn.aspx and handle the authentication process yourself, there are plenty of example on how to do this. I suggest you buy a book developing web application with VS.net from Microsoft press and it will give you all the information you need. |