Solved

How to implement froms authentication to one subfolder in your application

Posted on 2011-09-06
4
249 Views
Last Modified: 2012-06-27
Hi,

I have a subfolder which I have named 'secure' which I need to implemnt forms authentication to. Can someone please advise on the correct method of restricting a subfolder using forms authentication.
0
Comment
Question by:jazz__man
  • 2
4 Comments
 
LVL 2

Expert Comment

by:aianrnoens
ID: 36490578
System wide configuration settings are put in the machine.config file.
These settings can be overridden by placing a web.config file in the root directory of a website.
to override the root web.config place a web.config in the subfolder.

just place a web.config file in the secure sub folder with the following in it.
<configuration>
  <system.web>
    <authentication mode="forms"></authentication>
  </system.web>
</configuration>

Open in new window

0
 
LVL 2

Accepted Solution

by:
aianrnoens earned 250 total points
ID: 36490589
These are websites for research.

On forms authentication.
http://msdn.microsoft.com/en-us/library/xdt4thhy%28v=vs.71%29.aspx

On multiple web.config files.
http://www.codeproject.com/KB/aspnet/multipleWebConfig.aspx
0
 
LVL 2

Author Comment

by:jazz__man
ID: 36490668
I get the following error when I create the web.config in 'secure' folder....

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.


When I create a website in IIS out of the 'secure' folder i then get the following error ...

The file '/eCommerceUIFront/Secure/Masterpages/EcommerceFront.Master' does not exist.

0
 
LVL 4

Assisted Solution

by:asp_net2
asp_net2 earned 250 total points
ID: 36497878
Hi jazz_man,

Please upload your code and web.config files for viewing.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question