FormsAuthentication and Local Intranet Zone  
Author Message
C. Moya





PostPosted: 2007-4-8 21:06:04 Top

dotnet-framework-aspnet, FormsAuthentication and Local Intranet Zone I'm a bit stumped by this one: It seems that when I connect to my
application using the server's intranet name (http://intranetserver/MyApp/)
FormsAuthentication kicks back the user to the Login page after I call
RedirectFromLoginPage. It works fine if I access the server by IP address
(http://xx.xx.xx.xx) and if I access the server over its public domain name
(http://www.myserver.com).

Why is this happening?
I have IIS set to Anonymous Auth. Windows Auth is disabled. My web.config
auth section looks like this
<authentication mode="Forms">
<forms name=".MyAppAuth" loginUrl="Logon.aspx"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

--
-C. Moya
www.cmoya.com


 
C. Moya





PostPosted: 2007-4-10 8:04:00 Top

dotnet-framework-aspnet >> FormsAuthentication and Local Intranet Zone Believe it or not, we've discovered this is caused by underscores in the
server's name. (http://our_dev_server). We changed the underscores to
dashes, and everything now works.

I think this is a known issue going back to ASP.Classic(?). Not sure.

--
-C. Moya
www.cmoya.com

"C. Moya" <email***@***.com> wrote in message
news:email***@***.com...
> I'm a bit stumped by this one: It seems that when I connect to my
> application using the server's intranet name
> (http://intranetserver/MyApp/) FormsAuthentication kicks back the user to
> the Login page after I call RedirectFromLoginPage. It works fine if I
> access the server by IP address (http://xx.xx.xx.xx) and if I access the
> server over its public domain name (http://www.myserver.com).
>
> Why is this happening?
> I have IIS set to Anonymous Auth. Windows Auth is disabled. My web.config
> auth section looks like this
> <authentication mode="Forms">
> <forms name=".MyAppAuth" loginUrl="Logon.aspx"/>
> </authentication>
> <authorization>
> <deny users="?"/>
> </authorization>
>
> --
> -C. Moya
> www.cmoya.com
>


 
C. Moya





PostPosted: 2007-4-10 8:10:00 Top

dotnet-framework-aspnet >> FormsAuthentication and Local Intranet Zone And here's a link that explains the problem:
http://www.hanselman.com/blog/ObscureBugASPNETDoesntHandleCookiesWithNonstandardServerNames.aspx

"C. Moya" <email***@***.com> wrote in message
news:email***@***.com...
> Believe it or not, we've discovered this is caused by underscores in the
> server's name. (http://our_dev_server). We changed the underscores to
> dashes, and everything now works.
>
> I think this is a known issue going back to ASP.Classic(?). Not sure.
>
> --
> -C. Moya
> www.cmoya.com
>
> "C. Moya" <email***@***.com> wrote in message
> news:email***@***.com...
>> I'm a bit stumped by this one: It seems that when I connect to my
>> application using the server's intranet name
>> (http://intranetserver/MyApp/) FormsAuthentication kicks back the user to
>> the Login page after I call RedirectFromLoginPage. It works fine if I
>> access the server by IP address (http://xx.xx.xx.xx) and if I access the
>> server over its public domain name (http://www.myserver.com).
>>
>> Why is this happening?
>> I have IIS set to Anonymous Auth. Windows Auth is disabled. My web.config
>> auth section looks like this
>> <authentication mode="Forms">
>> <forms name=".MyAppAuth" loginUrl="Logon.aspx"/>
>> </authentication>
>> <authorization>
>> <deny users="?"/>
>> </authorization>
>>
>> --
>> -C. Moya
>> www.cmoya.com
>>
>
>