I thought that only applied to Forms authentication. Is that not the case? I don't have <forms> defined at all in Web.config.
Main Topics
Browse All TopicsI have an intranet web application using Integrated Windows Authentication only. The goal is for the users to never have to type in credentials to access the application. It should be seamless.
For some reason, though, users are intermittently being prompted for credentials. I'm trying to establish a pattern, but so far one is not coming into focus. The only thing I can offer is that it usually (though not always) is reported to happen after a period of inactivity. Usually 20-30 minutes.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I found this article, see if it applies to your problem:
http://support.microsoft.c
"If you set the SPN by using only the FQDN of the server that is running IIS, you will be prompted for your user credentials after 30 minutes. The 30-minute time-out occurs because of the way that Internet Explorer caches Domain Name System (DNS) information. After 30 minutes, Internet Explorer reverts to the NetBIOS name. Therefore, you must make sure that you also register the SPN by using the NetBIOS name of the server that is running IIS to avoid being prompted for your user credentials."
-dZ.
Never heard of this .. but Dropzone's link looks promising ...
If that does not solve ur problem can you please tell whether this prompting occurs when the user is browsing the same web pages that earlier did not prompt and when doing the same function? do you have any code which access other machines within the network i.e hop though multiple machines? Is impersonation set to true?
Rejo
Impersonation is not set.
The web server is standalone, not part of a farm. It is a virtual server running on VMWare if that makes a difference (can't imagine it would).
I had found DropZone's link via Google already, but it seems to be talking about web services running as a domain user. In my case, it's running as Network Service which that article indicates should not be affected by the problem the article is written to address.
Again, the intent is for the user to never have to log in to access the web app. As I understand it, this should be entirely feasible.
I should have mentioned that the user can cancel the login dialog, close the browser and reopen it and access the page again without logging in.
This tells me that there is some sort of issue with a cookie or a session expiring. It could conceivably be browser related, network related or .NET config related.
Or something else entirely. I'm at a loss.
When the browser prompts the user for credentials it is because the server responded with a 401 status code after the original credentials were sent. The browser then assumes that the last credentials failed and prompts the user.
Now, what is causing the web server to respond with a 401 status code is the mystery. The article mentions the application pool (not IIS or the service itself) running as a domain user. Can you confirm that this is not the case? Have you tried registering the SPN with the NetBIOS name just to be sure?
Also, have you tried using the "Authentication and Access Control Diagnostics" tool referenced in that article?
http://www.microsoft.com/d
Yes, that's how the HTTP Authentication works: The server responds with 401, and the browser re-sends the request with the appropriate credentials. Ocassionaly, in your case, the server will respond with a 401 after the browser sent the credentials, which causes the browser to assumed the credentials were rejected. It will then prompt the user for new credentials.
Since this seems to be a transient error with IE (for whatever mysterious reason, which we can't yet determine), if you close the browser and try again, it'll work.
Let us know if you are able to determine any problems with the diagnostics tool.
-dZ.
FYI: I'm looking at the Property sheet for the Application Pool. On the Identity tab, "Predefined" is selected and Network Service is shown in the drop-down next to it.
I'm a bit wary of futzing with the SPN as that's pretty far outside my area of expertise and I don't want to hose the webserver.
Would it make any difference that this webapp is runing on port 8080?
Well, fiddlesticks. The Authentication and Access Control Diagnostics tool will not accept my URL when I add the port number. It says http://pol-ntweb2:8080 is an invalid URL.
I followed the instructions in the article to edit the timeouts on a local machine and was able to reproduce the error much more quickly. I am beginning to suspect that it is indeed the NTLM/NetBIOS issue as described in the article.
Now the dreaded part: Trying to get the network nazis to listen to me and help chase this down.
Stewed on this problem over the weekend. Possible epiphany. The Microsoft whitepaper describes the problem as being a result of IE ditching server information after 30 minutes and reverting to the NetBIOS name.
I recall now that the NetBIOS name of our server is different from the domain name users use to access the web app. When our network group virtualized the server, they created it as POL-WEB2. The users' shortcuts point to POL-NTWEB2 which was redirected via NAT. So what may be happening is that IE is dropping the POL-NTWEB2 server information and reverting to the POL-WEB2 NetBIOS name, to which the user is not already authenticated.
Testing is under way.
Well not quite exactly. The article from MS was addressing the similar symptoms but an entirely different cause. It's written to resolve issues stemming from user accounts.
You are right, it was addressing similar symptoms from different causes. But ultimately the symptoms were manifested because of IE's behaviour, which is where it relates to your problem.
In any case, I'm glad you are close to solving it. I don't really think I deserve the points--at least not yet--since we still don't know if you will be able to solve the original problem completely. Although I'm fairly confident in this solution, we still could be barking off the wrong tree. Perhaps closing the question was a bit premature.
Indeed, I'd like to know how it plays out.
Cheers!
-dZ.
I haven't been prompted again since switching to use the NetBIOS name on my PC so my confidence is quite high. The only challenge ahead is getting the network group to play ball and make a change.
Premature to close it? Eh. Maybe. I felt the cause was identified as well as at least one possible workaround (don't use NAT). I wanted to award the points for your persistent followup. It's appreciated.
I'll add more comments once I talk to the network guys.
Business Accounts
Answer for Membership
by: DropZonePosted on 2009-01-23 at 03:02:36ID: 23447869
Check the length of your sessions (Web.Config <forms> tag, "timeout" attribute). Also, make sure you enable "sliding authentication", which resets the timeout on every request. Othewise, your sessions will be destroyed the moment the timeout occurs.
-dZ.