Solved

How to implement froms authentication to one subfolder in your application

Posted on 2011-09-06
4
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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