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

Brock Allen

You have *two* said:
all your settings in *one* <system.web> section.

He does?

He's got a second said:
I am having serious problems with my web.config file. When the
authentication lines are added below my application crashes.

What's the exception thrown?
 
J

Juan T. Llibre

Hmmm...you're right.

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

Thanks!
 

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,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top