I have a site that used Wordpress, and I have a directory outside of wordpress that I wish to use - but I wish to password protect this folder, Can anyone advise me as to how I do this - so that it will not interfere with the Wordpress site. This folder contains only a xml file that I wish to read/write and access thru a .exe file on the local system. What would be the format of the connection. Many thanks in advance - hope someone can help. www.frogshollow.com
Ok - thanks I got that far - now can you direct me to a similar tutorial on how to protect the directory. Apologies - I am new to this .... and thanks
Once you have connected to your site via IIS Manager. Navigate to the directory you want to password protect in the left pane Double click Authorization Rules icon in the main window Click Add Deny Rule In the pop up dialogue box, select All anonymous users Click OK Note that this action will add some entries into your web.config file
Hi, I have the same question and tried the referenced KB arcticle. Unfortunately it doesn't work for me. I get this error message: Config Error The configuration section 'security' cannot be read because it is missing a section declaration If I use a simple deny rule, I can still access other files in my folder directly. What I want is that regardless of what file, I want a login page first to protect access to and files in that folder. Do you have an example I can use?
This is the web.config I have in the folder: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <authentication mode="Forms"> <forms loginUrl="logon.aspx" protection="All" path="/" name=".ASPXFORMSAUTH"> </forms> </authentication> <authorization> <deny users="?" /> </authorization> </system.web> </configuration> It gets me the logon page when accessing the folder, but allows access to each file inside the folder.
If you just want to password protect the directory, you can follow the guide here, however, if you want to protect each file/folder with a login page, you'll need to implement ASP.NET membership.