XML error in Web.config Error (Forms Authentication)

  • Thread starter Thread starter Guest
  • Start date Start date
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>
 
<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.
 
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
 
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'.
 
Back
Top