views:

41

answers:

2

In my asp.net webforms application I am using plain and simple forms authentication hooked up into my database (with the standard membership provider). Everything works well, I can log in , log out, get roles, etc...

However, after deploying my site to the intranet IIS server I noticed that IE cannot be authenticated. The actual authentication process for logging in works (as it does tell you when your password/username is wrong) but after authentication completes it claims you aren't logged in.

This is only on my deployed IIS environment as locally while in my VS environment everything works just fine in IE. While in the deployed IIS chrome and Firefox work just fine.

The only thing I can tell is it looks like IE isn't getting or saving the authentication cookie. This is not IE setting related as I have my IE8 set to accept all cookies, and I tested on a coworker's IE8 machine and another's IE7 with the same results.

My web.config is using the following settings:

<authentication mode="Forms" >
  <forms cookieless="UseCookies" />
</authentication>  

Does anyone at least have a clue on where I would look to begin debugging this issue?

Thanks,


Edit: I have been forced to fix this issue now, since my webserver is not working well with URL authentication.

I have used fiddler and figured out that IIS7 is not sending any cookies to me when I am in IE. No cookies are in the headers. The cookies are correctly in the headers when serving the site to Mozilla and Chrome browsers though. I am at a loss as to why.....


Edit2: As a side note, when I log into the web server directly, if I go to Http://localhost/ IIS sends IE the cookies fine, but if I go to http://qa_build/ (that's the computer name for the server) IIS won't send the cookies to IE.

A: 

Is there another submit button on the page somewhere that is not related to the login?

I had a similar problem when trying to log in once, and discovered it only happened when I hit enter instead of clicking the login button, and it was being caused by another button taking the default button click. It would authenticate, but it would not give me any user roles.

Chris Mullins
Nope that's not it. My login.aspx page has only one button and only has a login control on it (with zero modifications to the login control template or code)
KallDrexx
+1  A: 

Finally figured out the answer. It turns out if the domain has an underscore in it, Internet Explorer tells the web server to never send cookies. Changing the computer's name to qabuild fixed it.

KallDrexx
Thats a pretty weird one, anyone know the explanation from the Microsoft Side.
Toby Allen
Reminds me of the issues I had with Audacity exporting to files by label names. One of the labels was named "con", an illegal file name.
Voyagerfan5761
I have just spent 6 hours pulling my hair out over this problem!!!! Thank you thank you thank you SO much for posting this.
DanB