By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,917 Members | 1,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,917 IT Pros & Developers. It's quick & easy.

<system.web>

P: n/a
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>
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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>

Nov 18 '05 #2

P: n/a
I'm still getting the following error regarding the <system.web> Element:
Unrecognized configuration section system.web.
"Karl Seguin" wrote:
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

--
MY ASP.Net tutorials
http://www.openmymind.net/
"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
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>


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.