Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > section registered as allowdefinition Error and Secure Folder

Reply
Thread Tools

section registered as allowdefinition Error and Secure Folder

 
 
ruffeo
Guest
Posts: n/a
 
      02-07-2007
There has been alot on the web about this web.config error that
happens in visual studio .net 2005. Most people think this has to do
with IIS, but .net 2005 doesn't run on IIS but a developer version
called ASP.net development server. The problem is caused by the
web.config having the authentication section inside a subfolder or a
location tag. The solution is simple make one authentication section
in the main part of the root web.config, see the following:

Root Directory Web.Config:
<system.web>

<authentication mode="Forms" >
<forms
name=".ASPXFORMSAUTH"
loginUrl="~\Admin\SecureCheckin.aspx"
protection="All"
timeout="180" defaultUrl="~\Admin\somepage.aspx >
</forms>
</authentication>
</system.web>


One addtion to the root director Web.Config to get the secure folder
to work:

<location path="Admin" >

<system.web>

<authorization >
<deny users="?" />

</authorization>

</system.web>

</location>


That is all there is to it for a quick secure folder within an ASP.NET
application. No other web.config files are needed.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error to use a section registered as allowDefinition='MachineOnly' beyond machine.config AAaron123 ASP .Net 4 01-21-2009 02:17 AM
It is an error to use a section registered as allowDefinition='MachineToApplication' jc ASP .Net 1 10-28-2008 09:13 PM
It is an error to use a section registered as allowDefinition='MachineToApplication' garyong_14300 Software 0 04-26-2007 01:13 AM
It is an error to use a section allowDefinition='MachineToApplicat Neal Miller ASP .Net Security 1 09-20-2006 03:02 AM
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level Dominick Baier [DevelopMentor] ASP .Net Security 5 07-05-2006 03:50 PM



Advertisments