Solved

How to implement froms authentication to one subfolder in your application

Posted on 2011-09-06
4
245 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Hi jazz_man,

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now