RE: XML error in Web.config Error (Forms Authentication)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tampa .NET Koder (TampaNETKoder_at_discussions.microsoft.com)
Date: 12/27/04


Date: Mon, 27 Dec 2004 12:49:03 -0800

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

"David GB" wrote:

> 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>
> --
> David Gordon-Brown



Relevant Pages

  • Re: Apache and password protection
    ... > AllowOverride AuthConfig ... If you're going to "Deny from all" in your root directory, ... supposed to be accessible by apache. ...
    (comp.os.linux.security)
  • RE: Forms-Based Security below Application Level
    ... Hi Alex, ... In your web.config of the root directory, ... The above would deny anonymous access to only those files which are under ... the securefolder1 and securefolder2. ...
    (microsoft.public.dotnet.framework.aspnet.security)