Home All Groups Group Topic Archive Search About

Authentication mode in web.config causing crash.

Author
10 Jun 2005 3:35 PM
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

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>S0zRyqi0VEKZKYfouj3IgA==</Id>

Author
10 Jun 2005 3:42 PM
Curt_C [MVP]
John Lynagh via .NET 247 wrote:
Show quoteHide quote
> 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
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>S0zRyqi0VEKZKYfouj3IgA==</Id>

My tag looks like this
<forms name=".blahblah" loginUrl="/login.aspx" protection="All"
timeout="20" path="/"></forms>

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com
Are all your drivers up to date? click for free checkup

Author
10 Jun 2005 3:55 PM
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...
======================

Show quoteHide quote
"John Lynagh via .NET 247" <anonym***@dotnet247.com> wrote in message
news:%23X2zPIdbFHA.2960@TK2MSFTNGP09.phx.gbl...
> 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
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>S0zRyqi0VEKZKYfouj3IgA==</Id>
Author
10 Jun 2005 8:28 PM
Brock Allen
> You have *two* <system.web> sections in your web.config. Consolidate
> all your settings in *one* <system.web> section.

He does?

Show quoteHide quote
>> <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>

He's got a second <system.web> under the <location> element, which is fine.

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

-Brock
DevelopMentor
http://staff.develop.com/ballen
Author
10 Jun 2005 8:44 PM
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...
======================

Show quoteHide quote
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:872038632540177230044784@msnews.microsoft.com...
>> You have *two* <system.web> sections in your web.config. Consolidate
>> all your settings in *one* <system.web> section.
>
> He does?
>
>>> <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>
>
> He's got a second <system.web> under the <location> element, which is fine.
>
>> 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?
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>
Author
10 Jun 2005 8:53 PM
Brock Allen
> Hmmm...you're right.
>
> I should go out and have a few beers on this Friday afternoon.

I'll join you :)

-Brock
DevelopMentor
http://staff.develop.com/ballen
Author
11 Jun 2005 3:11 AM
Scott Allen
Nobody invited me :(

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 10 Jun 2005 13:53:56 -0700, Brock Allen
<ballen@NOSPAMdevelop.com> wrote:

Show quoteHide quote
>> Hmmm...you're right.
>>
>> I should go out and have a few beers on this Friday afternoon.
>
>I'll join you :)
>
>-Brock
>DevelopMentor
>http://staff.develop.com/ballen
>
>
>

Bookmark and Share