473,468 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XML error in Web.config Error (Forms Authentication)

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
Nov 19 '05 #1
3 3249
<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.

"David GB" <Da*****@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com...
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

Nov 19 '05 #2
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

Nov 19 '05 #3
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'.

"John Blair" wrote:
<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.

"David GB" <Da*****@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com...
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


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
7
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- ...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
12
by: Brett Robichaud | last post by:
Is anyone familiar with this error? I have this running just fine on my local machine but when I pushed it out to our development server I get this error. I have no idea what it is saying. Any...
2
by: Thomas Scheiderich | last post by:
I am trying to set up forms authentication in my IIS pages. I have a folder inside of my root folder I am trying to protect and I am getting an error when a page in the folder is accessed. The...
0
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
1
by: Joe | last post by:
What I want to do is make only one page require a login. The application itself works fine. I'm getting the following error: Parser Error Message: It is an error to use a section registered as...
1
by: rh | last post by:
In my web.config file, I added code so that users will be redirected to 1 of 2 Login pages depending on the original page they are trying to access. However, I get the following error message: ...
4
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.