Session_OnEnd not firing after applying Windows 2003 Service Pack 2


We very recently discovered a bug in classic ASP (asp.dll) you get installing the Service Pack 2 for Windows 2003; removing the SP2 makes it work again as expected, so this is a regression bug introduced by the service pack itself. Basically with SP2 installed, the Session_OnEnd() method in classic ASP is not fired anymore, thus breaking all applications which rely on that event to run cleanup code.

We already have some reports from customers, either directly to CSS or in Newsgroups. I know my colleagues are already well on this, a private fix has been produced and is being tested internally (as far as I know it works) and we are writing a KB article to document this.

The process is still ongoing so I don’t have (and can’t give you) further details on this, but I guess it’s a matter of days before this will be publicly available; of course I’ll update this post when we’ll have the KB available.

Update (03/04/2007)
The KB article is still a draft and not public yet (should be released soon, anyway) but the fix is ready; you can get it calling CSS and ask for the hotfix #934903.

Update (17/04/2007)
The KB article has been published: http://support.microsoft.com/default.aspx?scid=kb;EN-US;934903

 

Cheers

Comments (48)

  1. Would this affect remote desktop. I noticed that after installing SP2 on 3  different servers Remote Desktop was SLOW and would disconnect. After uninstalling SP2 remote desktop worked just fine.

  2. carloc says:

    No, this is specific to classic ASP so Remote Desktop can’t suffer for it; I’ve not heard any reports about this slowness in Remote Desktop but I’ll check this (probably I’ll test RD on my server) and report it internally if needed.

    Thanks for your comment!

  3. Shahzad says:

    When something official is going to come up on this from Microsoft?

  4. carloc says:

    Unfortunately at the moment I don’t have any further update on this, other than we are investigating the issue (so I also don’t know how long this will take, I’m not directly involved in the process).

    But I’ll update this post (or create a new one, depending on the circumstances) to let you know as soon as possible.

  5. Fiorano.net says:

    V andaag belde een klant met het probleem dat zijn twee sites alleen nog maar 500 server errors gaf.

  6. Ken Schaefer says:

    It appears that there is a bug in Windows Server 2003 with Service Pack 2 – session_OnEnd events no longer

  7. Jarrod says:

    Having just migrated to a new server, windows 2k3 with SP2, that’d be why my site says I have 2,243 current users.

    I’d rather it was working and I did have the users. 😮

    Because your google ranking for this article is high you just saved me hours of hair pulling though, thanks 😀

    Jarrod.

  8. Berend Engelbrecht says:

    We just received the hotfix #934903 from Microsoft PSS and it does fix the problem. They will send it to you free of charge if you call them.

  9. Francisco A. Camargp says:

    Is there anybody who could send me the hot fix, urgent ? Or post it somewhere to be downloaded ? I´d hate having to remove SP2.

    Thanks any way….

    /Kiko

  10. carloc says:

    Hi Kiko, you can receive this hotfix (which is not pubblicly available for download) calling Microsoft CSS (Customer Service and Support, formerly PSS), the Engineer who’ll take ownership of your call will send you the private URL and password to download and install it.

    Note that the password expires every 7 days, so you must go through CSS to have the correct one…

    You can find the phone number to call for your country (along with other infos) at http://support.microsoft.com.

  11. nance says:

    I need this hotfix also

    Who can send a copy to me, thx~

    nance

  12. Ryan says:

    Support is listed as almost $300/call.  Are we supposed to pay $300 to get a patch for a bug MS caused?  When will this patch be made public?

  13. carloc says:

    Ryan (and others interested in this topic): the answer is “no“. Microsoft support policy about bugs is very clear at this regard: if you open a support call to request a hotfix, the call will be free of charge for you, you’ll not be charged for the service.

    Moreover, if troubleshooting a problem we discover that it’s due to a bug (either a known one and we alrady have a fix for it, or a new one and we’ll have to create the fix), the service will still be free for you, no matter how much time and efforts we made to find and correct it.

    To be even more clear: if it’s a Microsoft bug causing the problem, you’ll get the fix for free.

    Of course the above applies only if the problem is really due to a bug; if your problem turns out to be due to some other reason (by design, errors in your code, misconfiguration etc…) the call will be turned into a payment one, which may be either “Incident”, or “Pay Per Incident” (the one Ryan describes), hourly based if you have that kind of contract etc…

    Hope this helps to shed some light on the matter.

  14. Ryan says:

    I just got off the phone with Microsoft support and they were very helpful in sending me a link to the hotfix.  The hotfix is installed and worked correctly.

  15. Dr. Morose says:

    Yeap we called and no charge, they gave us a password protected file to unzip and apply. The fix worked great… We were wondering why we had over 40,000 online… Geez…

  16. Martin Konradsen says:

    I just called, and the the supporter did not want to help me, becouse i’m from Denmark.

    He said that i should call the danish office, but it is after hours, and I desperatly need this path now 🙁

    (The danish support-phoneline reconnected me to the American Helpdesk.)

  17. carloc says:

    Hi Martin, sorry to hear that, but there are actually some constraints with opening a case with US if you are based in EMEA… hopefully you’ve been able to open the call this morning calling your local support number in Denmark.

    Anyway note that you can open a call online from http://msdn2.microsoft.com/en-gb/aa570318.aspx (this is the UK page, chose your locale through the language dropdown at the top of the page).

    To everyone, please review the contact infos in http://blogs.msdn.com/carloc/archive/2007/06/27/how-to-contact-carlo.aspx

    Thanks

  18. Stephen says:

    I discovered this today after 4 hours of debugging.  All the drama that has gone on today aside.  This HF should be made public by now.  

    This is core functionality of ASP.  It’s in a very difficult spot to debug; global.asa when a session closes.  No error messages are going to be visible to end users.  A while has passed since this was released.  Isn’t it considered stable by now?  We are still waiting on MS to send the file.

    Like the website.  Thanks for the info.

  19. carloc says:

    I’m not sure what are the current plans about this hotfix, I’ll try to find out more and update the post if possible

  20. Stone Steps says:

    I cannot believe that MS missed a core bug of this nature. The MSDN article above is dated April 13th, 2007, which makes you wonder, how can it take MS over three months to fix a simple bug like this one?

  21. carloc says:

    The availability of the fix and f the KB article does not proceed at the same speed… of course the fix is the one which receives most attention and time spent.

    Actually I was one of the firsts in CSS to receive the first calls from customers reporting a problem with "classia ASP sessions", and the internal fix was already available (the one we used with those customers), and this happened weeks (don’t remember exactly how many, I should check my email archive) before the article was actually published…

  22. Dan says:

    We called CSS and have received the HotFix from them. After installing the HotFix successfully we are still having the exact same problem. Im not sure if theres a trick to installing that we are unaware of and MS refuse to help us without charging.

    Any advice?

    Thanks

  23. carloc says:

    Dan, there is no special trick to install this fix, it’s a “standard” package as other ones I’m sure you’ll have installed on your machines… are you sure everything went fine during the installation? Have you checked your event log and IIS logs? Have restarted IIS (or rebooted the system) after installation?

    Keep in mind that you may be seeing the same symptoms described in the KB, but for a different reason…

    The support policy says that if a problem is due to a bug in one of Microsoft’s products you’ll not be charged for the service (both if you ask for a hotfix, or if during a support call we’ll discover the problem was due to a known or unknown bug).

    But if installing the fix does not resolve the problem, we can’t continue working on the issue (on the same Service Request) and we need a “standard” case (either “incident” or “payment” type), depending on your contract.

    Support Options FAQ – Advisory Services
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerfaqadvserv
    http://support.microsoft.com/gp/advisoryservice
    “Problem Resolution Services are delivered on an incident basis. A Problem Resolution incident is defined as a single support issue and the reasonable effort required to resolve it. A single support issue is a problem that cannot be broken down into subordinate issues. If a problem consists of subordinate issues, each shall be considered a separate incident. If Microsoft determines that the problem is the result of a defect in a Microsoft product, the customer will not be charged for that incident. Problem Resolutions Services are not designed to address “how to” or “how do I” questions, and customers should consider other support options including Advisory Services”

  24. liangson says:

    Hi, anybody can send me the copy of Fix? thanks

    Email: xxxxxxxxxxxxx (edited to avoid spam through the blog: [Carlo])

    Thanks.

  25. carloc says:

    Victor (liangson), sorry but you have to go through a CSS request to get this fix, see my previous comment above to know how you can open a free call to get it.

    Thanks for your understanding

  26. Rich Turocy says:

    Is the prerequisite correct in the KB article?

    "Prerequisites

    You must have Windows Server 2003 with Service Pack 1 (SP1) installed to apply this hotfix."

    Is this hotfix for SP1 or should the prerequisite be SP2 installed?

  27. carloc says:

    Rick, this fix is post-SP2 (it actually fixes a regression bug introduced by SP2): where did you get that message? Trying to install it or in the docs?

  28. Rich Turocy says:

    The message is in the KB article:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;934903

    I thought by you write up that it applied to SP2 but wanted to make sure.

  29. carloc says:

    Thanks for reporting this; I’m not the author of the article but I’ll manage to have it fixed.

  30. Rich Turocy says:

    Do you have any idea when this hotfix will be available for general public either as a patch or in SP3?  I have a ASP/COM+ application that we have installed in a number of customers, many of whom are on Windows 2003 SP2.

    I would like to tell them when this will be available officially.

    Thanks

  31. carloc says:

    Unfortunately I don’t have this information, I already tried to have something official a few months ago but at that time this fix was not scheduled to be released publicly because of the very low volume of requests we got… anyway I just pinged again the people in charge to make this decision, I’ll update the post as soon as I’ll get some news

  32. carloc says:

    Rich, the article has been corrected

  33. Poli B says:

    I just called support for the hot fix.  Had to be transferred a quite a bit.  Make sure you call for IIS support and not Win 2K3.  Call is indeed free for a hot fix.  However I was charged due to being transferred around.  Guess it wasn’t noted with the different departments I was talking to, so double check at the end of your call.  I was able to get it refunded.

    I’m still waiting for the hot fix to be sent.  Basically they tell you to fill out a form and will send you the file through email.

  34. carloc says:

    Weird you were charged for the call, all departments and teams in CSS know that hotfix/bug calls must be closed as "Non decrement", that’s Microsoft policy not just a rule some teams have and some don’t…  :o)

    Depending on the workload on the team it might take some time (maybe the day after, if you open the call towards the end of the day) for someone to pick the case and send the fix.

  35. Marce says:

    Hi. I need your help. I have a problem with an ASP application that works with components (COM+). I receive the next error: " method ~ of ‘object ~ ‘failed", but this error occurs when a component calls another component, and this one calls one more. If the second component don’t call another, there isn’t error. Can you help me? This error appears when I installed Win2003SP2, if SP2 is uninstalled, the error disappear.

    Thank you.

  36. carloc says:

    Hi Marce, usually that error appears when a COM component is not registered (regsvr32 <name.dll>): I guess you already tried with it?

    Let me know; if we don’t find anything quickly you may consider to create a support call to better and "officially" troubleshoot the problem.

    HTH

  37. Surinder says:

    I’m having the same problem. The Session_OnEnd event was firing perfectly before Windows 2003 Service Pack 2.

    I’ve applied hotfix #934903 and rebooted the server. No difference, the event still isn’t firing.

    Any ideas?

  38. carloc says:

    Hi Surinder, please check of the file you have in your server matches the version installed with the fix:

    Asp.dll  6.0.3790.4050

    If it does and the event still does not fire then I suggest you to open a support call because you’re very likely facing a different problem which just appears with the same symptoms of this bug. Let me know.

    THT

  39. Surinder says:

    Hi Carloc, I was mistaken. It is now firing. The example I was using to debug contained Request.ServerVariables("REMOTE_ADDR") in the Session_OnEnd routine which was causing it to fail.

    Thanks, Surinder

  40. Hi,

    I just discovered this bug. It is a 10 month old one and still MS did not provided an official HotFix. I submitted a request to Microsoft Online Customer Services, ad requested in the KB page (KB934903), but got no reply.

    Any idea of how can I get the hotfix ? Why they weren’t able to fix it after 10 months ? Are they simply trying to remove .asp from IIS ?

    Many Thanks,

    Nick.

  41. carloc says:

    Hi Nicola, the fix has been made available a few days after the bug has been discovered, and if you look at previous comments in this post you’ll see that other people got the fix pretty quickly and fixed the problem quite easily.

    If you have not heard anything back from the online support I can only think of a specific issue with your request, not that the fix is not available…

    So please open a "standard" support call through http://support.microsoft.com (choose the page for your country) and you’ll be contacted by a Support Engineer (possibly me, if you’re based in EMEA) and we’ll immediately send you the fix, of course free of charge.

    HTH

    Feel free to contact me throw the "email" link at the top of this page if something is still not clear or does not work as you expected

  42. Matt says:

    carloc,

    Thank you!  Microsoft should give you a raise as your answers are very well presented despite the large volume of idiotic requests on this blog.  I have spent many hours trying to figure out why Session_OnEnd would no longer fire when we knew that it was working in the past.  I finally came accross the KB article that described the issue and when I followed the link to request the hotfix I got the following response:


    I am unable to locate the hotfix mentioned in KB article 934903 for the product you have specified.

    I recommend contacting Microsoft Support Professional at  (800) 936-5700 for further assistance. The working hours are Monday – Friday 5:00 A.M. – 9:00 P.M. Pacific time, Saturday – Sunday 6:00 A.M. – 3:00 P.M. Pacific time.

    I hope the issue is resolved soon and appreciate your patience in this regard.  

    Thank you for using Microsoft products and services.

    Nandini

    Microsoft Customer Service Representative


    I was very disapointed by this response, however when I called CSS, the rep I talked to was very friendly and helpful and was kind enough to send me the hotfix right away (and free of charge as you mentioned).  

    To all the people with this issue:  TAKE THE TIME TO READ THIS ENTIRE BLOG before you post a request for someone to send you the file.  Microsoft will fix the issue for free, why is this so hard to understand?

  43. M Schmucki says:

    Hotfix received from Microsoft -fixed our issue.

  44. jim says:

    Thanks for the advice, but can i ask why you guys distribute hotfixes like this?

    if it has been confirmed that the dll has a bug in it, and that this has proven consequences… surely you should either have a windows update for it, or (presumably because you don’t want to bump up the numbers for that one) have a download link on the KB page.

    bearing in mind that a lot of the time, devs work through the night trying to fix bugs etc….and our local office could well be out of hours by the time we EVENTUALLY find a page like this one telling us what’s going on.

    you’ve had a fix available … on a SERVER os (ie, possibly business critical) for over a YEAR now and I STILL cant get it without making a PHONECALL? what year is this?

  45. carloc says:

    Jim, thanks for your feedback and I understand your concern; if you have a look at my other post (http://blogs.msdn.com/carloc/archive/2007/05/08/the-public-private-hotfix-debate.aspx) you can see that this is an ongoing discussion I’ve been into almost since I joined Microsoft. The reasons for this choice are complex but I tried to discuss at least some of the (the most important in my opinion) in that post.

    Anyway things are moving as you can imagine, and for example some time ago (do not remember exactly when, but are quite a few months now) at least some of those hotfixes (for sure the ones for Visual Studio and the .NET Framework) are made available directly to you through the Connect site (see http://connect.microsoft.com/content/content.aspx?ContentID=3705&siteid=210); to be honest I don’t know now how long it will take to have every hotfix available that way but at least you have a place where you can have a look if you find in the need to, before calling Microsoft Support.

    As a side note let me state that since the fix has been made available over one year ago that’s not enough to tell "Ok, now you can get it without calling CSS"… for the reasons exaplined in my other post (less testing, potential impact on the system etc…) those hotfixes will always be private and you’ll always have to call CSS to get them. Unless those are eventually included in a Service Pack (and most of them actually are) or will be made available through the Connect site (or whatever other form the people responsible to make this decision will choose).

    HTH

  46. Kavita says:

    Thank you for this post.  I was able to resolve this issue on our server by installing the hotfix that I received from Microsoft.

  47. mmanuel says:

    Hi,

    can you tell me if this hotfix is now available through windows update or is an SP3 for W2K3 that includes that fix coming soon?

    Thanks in advance

    Manuel.

  48. carloc says:

    Hello Manuel,

    Yes, the fix will be included in Windows 2003 SP3 but I do not have a timeframe for its release; I cannot doublecheck but I'm pretty sure this is also available through Windows Update.

    HTH