Authentication mode in web.config causing crash.

  • Thread starter John Lynagh via .NET 247
  • 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
 
C

Curt_C [MVP]

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>
 
J

Juan T. Llibre

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...
======================
 
J

Juan T. Llibre

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...
======================
 

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

Top