Long Delay on First Request to ASP.NET 2.0 Application

I have worked several issues recently regarding long delays on the first request to an ASP.NET application. These delays are much longer than typical app domain startups and JIT compiles. To troubleshoot these issues, I get hang dumps of the process to see what's going on. In those dumps, I can see that we are calling the LsaLookupNames2 API and we're waiting on that call. In almost all of the cases, we're waiting on an account lookup for an account named ProcessIdentity.

The source of this is a call we make in webengine.dll during the startup of the application domain. Because the ProcessIdentity account doesn't exist, we sit and wait on name resolution from trusted domains, etc. A workaround is to add a local account called ProcessIdentity to the web server, but many customers don't like that workaround.

We currently have a hotfix in the works for this issue. Once that hotfix is available, I will post information on it. In the meantime, you can use the workaround mentioned above. Please don't contact me or PSS asking for the fix for this. We haven't finished the fix yet and you won't be able to get it, but I thought it was an important enough issue to let you know about it now.

If you have a question, please post a comment here instead of calling PSS.

Thanks!

Jim

Comments

  • Anonymous
    October 25, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/10/25/long-delay-on-first-request-to-aspnet-20-application/

  • Anonymous
    December 03, 2007
    Greetings Jim, Just curious if you have any timelines for the release of the hotfix?  Thanks, for letting us know about the issue saved me alot of wasted time.

  • Anonymous
    December 03, 2007
    Dustin, We've just moved past the customer testing stage and we're building the installation package now. I'd hope to have it within the next couple of weeks. Jim

  • Anonymous
    December 04, 2007
    Thanks Jim, Look forward to the release. Regards, Dustin

  • Anonymous
    January 08, 2008
    A while back, I wrote a post regarding slow startup of ASP.NET 2.0 applications due to a lookup on a

  • Anonymous
    January 08, 2008
    A while back, I wrote a post regarding slow startup of ASP.NET 2.0 applications due to a lookup on a

  • Anonymous
    January 17, 2008
    After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications

  • Anonymous
    January 17, 2008
    After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications

  • Anonymous
    January 21, 2008
    Hi Jim, Does this issue only affect .Net 2.0 ? The reason I ask is that we are experiencing a very similar issue which affects all of our .Net apps (1.1 and 2.0) The original issue we had is actually mentioned by Tess here (http://blogs.msdn.com/tess/archive/2008/01/17/asp-net-hang-slowness-on-startup.aspx) Unfortunately, upgrading to the 64-bit version didn't fix the issue in the long run - it re-emerged after a while and we still haven't fixed it. So, I'm wondering if the issue we've got may actually be due to this bug in the .Net Framework ? Regards, Paul Lynch [MVP - IIS]

  • Anonymous
    January 21, 2008
    Hi, Paul. There is a similar issue that I've seen a couple of times in 1.x. The only way to know for sure what's happening in your case is to debug it and see why the slowness is happening. If you open a case with us, we can get a dump of the process and debug it to see what's going on. Jim

  • Anonymous
    February 15, 2008
    Hi Jim, Thank you for the blog, its very informative.  I have a question with out applictaion and hoping you can shed some light on this. we recently deployed a asp.net app in our UAT server, and are experiencing a long delay response with, usually the response time is 100ms or around there.  but if there are no requests for a minute or so then the next request takes about 7seconds, event through the page size is only 7kb.  Its like the app "goes to bed" or unloads, I am not using session state and I have turned it off in my webconfig, we are using windows2003 and iis 6. is there some setting that I am missing, if you could shed any light on this that would be great.  Thanks for the blog. Cheers, Ricky

  • Anonymous
    February 17, 2008
    Ricky, It's really hard to say without collecting data and troubleshooting. It could be that your idle timeout on the Performance tab of app pool properties has been set far too low. It could also be that something has caused the application domain to unload. You can monitor the PID and Application Restarts using perfmon. That might give you a better idea of what's going on. Jim

  • Anonymous
    February 19, 2008
    Hi Jim, I'm currently encountering this issue on my development workstation. I've applied .NET 2.0 SP1 but this has not helped. I called tech support and was told that that KB 944157 has been archived and is no longer available at the support site. I was also told that the hotfix has been pulled. Is there an updated KB article? Thanks. Jo

  • Anonymous
    February 19, 2008
    Hi, Jo. If you're still seeing a delay after installing SP1, it's not the same issue. I am perplexed by the message you received from our support. Can you email me at jamesche@microsoft.com and let me know the details of that call? Jim

  • Anonymous
    August 21, 2008
    Hi Jim, We have a WinForms based .Net 2.0 application Its taking more than a minute to start up intially Is there any tool to troubleshoot this kind of startup issues Will the performance profiler help here as its for after the loading Thanks,

  • Anonymous
    August 21, 2008
    I'm not sure what profiler you're talking about, but if you want to know what's going on in the process during that time, a post-mortem debug analysis is a good way. There could, however, be issues with a winforms app that I wouldn't know of since I am exclusively a web app guy. Jim

  • Anonymous
    November 09, 2008
    I too have a .Net 2 application (built in IronSpeed) that now has a 50 sec delay on starting up. Any help on tracking down the problem would be appreciated. Thanks

  • Anonymous
    November 10, 2008
    Hi, Mark. You'd want to be sure that 50 seconds is abnormal. In other words, it could just be JITting your app that causes that delay. However, if you want to find out for sure, the best way is to get a hang dump of the process during the delay and examine the threads to see what's going on in the process. If you don't know how to do that, you can open a case with us and we can assist. Jim

  • Anonymous
    March 31, 2009
    I am using Citrix Web Interface 5, an ASP.NET 2.0 application, on Windows Server 2003 / IIS 6. It takes 2 minutes to access the first time (and after some idle time even though I configured the App pool to never shut down). I have applied .NET FrameWork 3.5 SP1 and the family updates; I have added a local account called ProcessIdentity; none of these steps has resolved the issue. What can I try next; how do I get a hang dump of the process during the delay? Thanks, Peter A.

  • Anonymous
    March 31, 2009
    Peter, You should open a case with us and have one of our engineers assist you with that. Jim

  • Anonymous
    April 01, 2009
    Jim, How do I open a case with you? PS: It takes a while to open this blog page almost every time I try and from different computers at different locations. Just FYI. Peter A.

  • Anonymous
    April 01, 2009
    Hi, Peter. The MSDN blog site is slow right now for some reason. Not sure why. You can find a contact method using our support site at support.microsoft.com. Jim

  • Anonymous
    March 31, 2010
    Since 2004 i am working in asp.net. But now after 6 yrs the problem that asp.net pages opens slow and also performance issues are there i am making my mind to shift to php or jsp. ASP.NET is good but its too slow. Believe my until unless you dont' apply Dedicated server compression techniques you wont get a good speed and pages wont open like other sites in php. In my opinion Microsoft people should rethink what they are doing they are adding more and more things (Silverlight,MVC,4.0 Framework) but no one is bothered about the speed and performance issues. If i am wrong do tell me on the blog. Thanks Ritessh

  • Anonymous
    March 31, 2010
    Ritessh, That shouldn't be the case. In fact, we've put a lot of work into performance in both the Web server itself and in ASP.NET. If you're having specific performance issues, you should engage us to assist in determining where the problem is. Jim