XML error in Web.config Error (Forms Authentication)

G

Guest

I'm trying to set u forms mode authentiaction on a sub-directory.

The web.config for the overall site is set to <authentication mode="None" />

In the sub-directory I have a very simple web.conig, but it gives me an
error when IIS tries to process it:
" '<', hexadecimal value 0x3C, is an invalid attribute character. Line 11,
position 5."
Line 9: <authorization>
Line 10: <deny users='?"/>
Line 11: </authorization>
Line 12: </system.web>
Line 13: </configuration>

The complete web.config is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authentication mode="Forms" >
<forms
loginurl = "../login/login.aspx"
name = ".SCIauth"/>
</authentication>
<authorization>
<deny users='?"/>
</authorization>
</system.web>
</configuration>
 
J

John Blair

<deny users='?"/>

the above lineline 10 looks unusual if you open with single quote then
suggest closing
with single quote i.e. use both single quotes or double quotes '?' or "?"
not mixed.
 
G

Guest

yoru <deny> element should have the ? in "" like so
<deny users="?" />

also, you can't set teh <authentication mode="Forms" > within a
subdirectory, this can only be defined at the root directory of your virtual
direction. User the <location element to control access in subfolders
 
G

Guest

Thanks. I couldn't see that.
David's rule #1a: "There is nothing harder to spot than your own tupid
mistakes."
David's rule #1b: "There is nothing easier to spot than someone else's
stupid mistakes"

BTW, did you know that web.config is case sensitive? 'loginurl' won't work,
it must be 'LoginUrl'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top