473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

<system.web>

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
2 1777
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Heuer | last post by:
Is there a way to specify proxy logon information if you use the <system.net> <proxyAddress> configuration methods for the web.config? -th
2
by: S.K. Dutta | last post by:
Hi! I am having a problem that I do not have any clue on what to do. I have tries a few obvious things... <system.diagnostics> in the main web.config file is giving configuration error on a...
4
by: Jiho Han | last post by:
I have the following defined in web.config under <configuration> node: <system.diagnostics> <switches> <add name="MainSwitch" value="4"/> </switches>
0
by: I am Sam | last post by:
I don't know what is wrong with my web.config file. I can access web pages outside the "Administration" folder but when I try to access files inside that folder I get the following error: ...
3
by: MikeM | last post by:
I've been trying to locate some property or method that will allow programmatic access to the "loginUrl" attribute in the web.config file in the <system.web> -> <authentication> element when the...
2
by: Bern McCarty | last post by:
In the old MEC++ syntax I can do this: // compile in VS 2005 shell with cl -clr:oldsyntax -LD ArrayCopyOldSyntax.cpp #using <mscorlib.dll> public __gc class CopyTest { private:...
5
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE"...
0
by: msnews.microsoft.com | last post by:
Hi, I am tring to use Trace Listener in asp.net 1.1 application as mentoned here. But i am getting the following error, Configuration Error Description: An error occurred during the processing...
0
by: enggwaqas | last post by:
I am exposing my Biztalk orchestration as a web service and want to consume this web service asyncly, but when i added web reference in my visual studio project it isn't displying Begin<Web Method...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.