Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to implement froms authentication to one subfolder in your application

Posted on 2011-09-06
4
Medium Priority
?
259 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 1000 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 1000 total points
ID: 36497878
Hi jazz_man,

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

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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