System.Runtime.InteropServices.COMException Error Code 500 or other

Well; you have an old software which was running stable but suddenly started to scream : System.Runtime.InteropServices.COMException Error Code 500 or other. You did everything, tried all conditions, even re-checked all old coding..etc but could not find a way out..

Well do not worry, I know you got lost around but there is a simple solution.


Exception Details: System.Runtime.InteropServices.COMException: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

 First of all; this usually happens with old programs written on programming platforms older than dotnet but working on Framework 2.0 or later.

And mostly if your program is using COM components for passing SQL querystrings, form postback data or accessing Active Server Pages (ASP) objects, this error may occur.

Actually what causing this is a Microsoft Bug, whose existence is accepted by Microsoft as well :) [KB-973746]
Microsoft has an hotfix for that but they are asking to contact with them, they do not share the hotfix via web, strange !

But you still have a solution ;

What causing this  is that you probably have a value passing via querystring, and that value is passing tab character\empty char,  find that value and fill it. Then you will not have that error again;
For instance;  You have a query "UPDATE myTable Set Column=&myValue&", probably myValue is empty, check it out..
This problem occurs when the form data or querystring data is marshaled from the managed code to the native code. In this situation, the data is encoded as a string. Additionally, the TAB character is used to separate different entries. However, when the data already has entry values that contain a TAB character, the newly introduced TAB character corrupts the data in the native code during the decoding process. [MS-KB-973746]

References
Microsoft KB - 973746

3 comments:

  1. First of all I would like to say great blog! I had a quick question which I'd like
    to ask if you don't mind. I was interested to
    know how you center yourself and clear your mind before writing.
    I've had difficulty clearing my thoughts in getting my ideas out there.
    I do take pleasure in writing however it just seems like
    the first 10 to 15 minutes are usually lost just trying to
    figure out how to begin. Any ideas or hints? Appreciate it!

    ReplyDelete
  2. BangJackets is serving several customers currently. Our customer products range from Hikers, climbers, skiers, snowboarders, bikers to mountaineers’ jackets, bradley cooper a star is born jacket and many other categories both in males and females. BangJackets cooperate with the premium courier services working internationally across the globe to bring you the best and efficient shipping and delivery solutions.

    ReplyDelete
  3. A fashionable and timeless jacket that can be worn with many different styles, this jacket is one of our best sellers. Buy Mauvetree best leather jacket

    ReplyDelete

© 2011-2015 | EmreCiftci.net. Powered by Blogger.