Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

security and web.config

Status
Not open for further replies.

rotsey

Programmer
Nov 23, 2004
135
AU
Hi,

I have an app that I want to have forms security using a database.

But I want to have some pages not included in that security.

So I created a subfolder off the app root and put the pages in there and used a web.config file with no security as such
<authentication mode="None">

</authentication>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>

But I get an error when I try run the app.


Is this the right way to do it?????

rotsey
 
No, the subfolder's web.config should look something like this:

<configuration>
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</configuration>

Each application can only have one type of authentication, so declaring it again in a sub folder yields the exception you're seeing.

-p

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top