Authentication mode in web.config causing crash.

  • Thread starter Thread starter John Lynagh via .NET 247
  • Start date Start date
J

John Lynagh via .NET 247

Hi there,
I am having serious problems with my web.config file. When the authentication lines are added below my application crashes. When they are removed it works fine. Is there syntax error below or is there something more sinister going on.

Any help greatly appreciated.


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<customErrors mode="Off" />
* <authentication mode="Forms">
* <forms name="AuthCookie" loginUrl="login.aspx" />
* </authentication>
</system.web>

<location path="MyMobile.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>



Thanks,
John Lynagh
 
John said:
Hi there,
I am having serious problems with my web.config file. When the authentication lines are added below my application crashes. When they are removed it works fine. Is there syntax error below or is there something more sinister going on.

Any help greatly appreciated.


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<customErrors mode="Off" />
* <authentication mode="Forms">
* <forms name="AuthCookie" loginUrl="login.aspx" />
* </authentication>
</system.web>

<location path="MyMobile.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>



Thanks,
John Lynagh

My tag looks like this
<forms name=".blahblah" loginUrl="/login.aspx" protection="All"
timeout="20" path="/"></forms>
 
You have *two* <system.web> sections in your web.config.
Consolidate all your settings in *one* <system.web> section.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Hmmm...you're right.

I should go out and have a few beers on this Friday afternoon.

Thanks!



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Back
Top