<system.web>

G

Guest

Can someone tell me what is wrong with this web.config file? Whenever I try
to open a file in the protected directory "Administration" I get an error
message indicating that the <system.web> Element is not recognized or
something to that effect. Any suggestions or help would be greatly
appreciated. I have attached the web.config file below. Thank you.
************************************************************
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation
defaultLanguage="c#"
debug="true"
/>
<customErrors
mode="RemoteOnly"
/>

<authentication mode="Forms" />

<authorization>
<allow users="*" />
</authorization>

<trace
enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>

</system.web>

<location path="Administration">
<system.web>
<authentication mode="Forms">
<forms
name="tqAdmin"
loginUrl="/Login.aspx"
protection="All"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

</configuration>
 
K

Karl Seguin

The only think I can see is that your <authentication shouldn't be in
<location> but instead in the main one...your <location><system.web> shouldn
only have an <authorization> element...something like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
...
<authentication mode="Forms">
<forms name="tqAdmin" loginUrl="/Login.aspx" protection="All" />
</authentication>
</system.web>
<location path="Administration">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>

Karl
 
G

Guest

I'm still getting the following error regarding the <system.web> Element:
Unrecognized configuration section system.web.
 

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,770
Messages
2,569,586
Members
45,083
Latest member
SylviaHarr

Latest Threads

Top