Catastrophic Failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

2 minute read,

I came across the following IIS/ASP.NET while working on our production servers for RentToolbox.com:

Server Error in '/' Application.

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E\_UNEXPECTED))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and
where it originated in the code.  
  
Exception Details: System.Runtime.InteropServices.COMException:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF
(E\_UNEXPECTED))  
  
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 
[COMException (0x8000ffff): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
[FileLoadException: Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +72
System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
System.Type.GetType(String typeName) +48
System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +9
System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +1800
System.Web.Configuration.CompilationSection.get_RecompilationHash() +68
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(StandardDiskBuildResultCache diskCache) +741
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(StandardDiskBuildResultCache diskCache) +46
System.Web.Compilation.BuildManager.PrecompiledAppRuntimeModeInitialize() +709
System.Web.Compilation.BuildManager.Initialize() +3581889
System.Web.Compilation.BuildManager.InitializeBuildManager() +228
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +333   

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3540923
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +275

Version Information: Microsoft
.NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

The issue only appeared when ASP.NET was initializing on the first request from a web browser. If you requested the website a second time, the application would finally kick-in and start. However, if you restarted the W3SVC service (effectively reloading IIS and ASP.NET), and request the site again, you’ll get the error. In a production environment, whenever you restart the W3SVC service, you don’t want errors like this popping up.

I looked in C:\WINDOWS\assembly, and Microsoft.Jscript was in the GAC. I figured this might be a permission issue with the IIS worker process identity that ASP.NET uses. We currently host our web-app over a network share, and have a separate identity access the network share. So, I setup the worker process application pool identity to use a configurable identity instead of the predefined Network Service account.

Now, the problem seemed to have gone away. I guess it’s one of those annoying mysterious windows flukes :) Oh, and don’t forget to use:

aspnet\_regiis.exe –ga UserAccount

To grant access to the IIS Metabase and permissions to the UserAccount running the worker process, otherwise, you’ll get “Service Unavailable” errors.

Hope that helps.     Here’s some more information that might be helpful: http://forums.asp.net/t/991648.aspx

Updated:

Comments

elvio henrique

Hey Brian, i’m been trought to the same problem with my webhost…. i just like to no, how do you configured inside the IIS to fixed this problem???and what’s the version of IIS we talking about???
…because i’m using the 5.1 and don’t have any option like “Aplication Pool Identity”…but i look in the google and just the 6.0 have this option….tks….i hope you don’t mind about any language error…i’m from brazil….

Brian Chavez

Hi Elvio,

I was using IIS 6.0 when that error occurred, and I also had complete administrative access to the machine. I’m not sure how you would fix the problem if you don’t have full access to the machine.

SAG

Need help with following error URGENTLY …

(Visual Studio 2003, .Net Framework 1.1, VB.Net, Creating Web Application)

Added control to General toolbox, added to page by drag and drop, this generated object of the contol in .aspx -

<OBJECT id=”WebChartX1” …..><PARAM NAME= ….><PARAM NAME= ….></OBJECT>

also generated following code in .aspx.vb -

Private designerPlaceholderDeclaration As System.Object

On debugging it generated this error as soon as it tries to access the method / property of the object for the first time.

Object has been initialized in InitializeComponent() as -

WebChartX1 = New WEBCHARTXLib.WebChartX

——————————————-
Catastrophic failure
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Catastrophic failure

Source Error:


Line 146: Dim row As Short
Line 147:
Line 148: WebChartX1.Symbol = Symbol
Line 149:
Line 150: ‘First add a panel (chart area) for the OHLC data:


Source File: C:\Inetpub\wwwroot\WebChartX\Main.aspx.vb Line: 148

Stack Trace:


[COMException (0x8000ffff): Catastrophic failure]
System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) +463
WEBCHARTXLib.WebChartXClass.set_Symbol(String ) +0
WebChartX.WebForm1.LoadChart(String& Symbol) in C:\Inetpub\wwwroot\WebChartX\Main.aspx.vb:148
WebChartX.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WebChartX\Main.aspx.vb:73
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750




——————————————————————————–
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Brian Chavez

Hi SAG,

It appears that you’re using COM Interop crossing over to the unmanaged world, which is already sort of a “prone-to-error” deal if not done right, especially with ASP.NET due to even more stringent security requirements.

It looks like you already had the .NET type generator generate your managed wrapped .NET class library for your COM DLL with WebChartX.

My suggestion would be first to make sure that your COM library (not the .NET DLL) is registered in the registry by using regsrv32.exe:

regsvr32 WebChartX.DLL

if WebChartX.DLL is your COM library.

Your COM library needs to be registered in the registry by using the command above both on your DEV and PRODUCTION webserver machines.

If that still doesn’t work. I’d suggest looking into security permissions and try giving the worker process in IIS full permission on the machine and see if it works then…

Also, make sure that your COM DLL is located in a findable and NTFS permissions are OK wherever your COM DLL (and .NET wrapper) are location on the server.

If it still doesn’t work. Try initializing a less heavier object in your COM DLL. Perhaps the object WebChartXClass is trying to access a restricted resource on the machine.

Hope that helps,
Brian Chavez

Yuwan Liu

Hi, I need urgent help!

I try to call a routine in a OCX, I received the same error, my code is:
Dim result As Long
m_RSAEngine = CreateObject(“RSAENGINE.RSAEngineCtrl.1”)
m_RSAEngine.CreateControl()
result = m_RSAEngine.Init(pubkey, privkey)

I run this on my desktop and I don’t have administrator privilidge.

Please advise.

chintan

Hello,

I am getting this error on execution of com component method.I have registered the com component it was working nicely but now surprisingly its giving this error.I am using c# windows appl vs2008

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED + c# windows application.

Please assist me.

Anup

Hi sir,

I am Unable to copy the item from source PST file to Destination PST file in c# using MS Outlook 2000.

I have registerd the Redemption Dll file. It works fine for outlook2003,2007 except outlook 2000.

My code is like :

for (f_iIndex = 1; f_iIndex <= objFolder.Items.Count; f_iIndex++)
{
objFolder.Items[f_iIndex].CopyTo(objSimilarFolder);
}

I am getting the Error like this :

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

The syntax is correct and also the objSimilarFolder is also not null.
Actually the code works for other outlook version.

I have read few forums but couldn’t understand the error and how to solve it.

please help me out…..

Thanks in advance.

Prits

hi,

I am developing a website using vs.net 2005.In my app i use webservice to talk to an API for each method.It works perfectly fine until i get an error message.

Instead of proper error message i get this error.”Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))”.

Please help.

Thanks
Prits

Donald (Don) Petry III

We opened a support case with Microsoft on this issue and after weeks of gathering traces and dumps they identified a root cause. This problem is a cryptic manifestation of a known issue with URLMON.dll.

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

We performed the following fix which resolved the issue:

Click Start , click Run, type regedit , and then click OK
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
Note If the FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 subkey does not exist, you must manually create it
Right-click FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 , point to New, and then click DWORD Value
Type w3wp.exe to name the new registry entry, and then press ENTER
Right-click w3wp.exe , and then click Modify
In the Value data box, type 1 , and then click OK
Exit Registry Editor.
Restart the system

I hope this saves others the months of pain and effort this issue caused us.

Donald (Don) Petry III

Find me on LinkedIn

Prabu

Visual Studio

Click on TOOLs->OPTIONS->DEBUGGING

Disable just my code(Managed only)

under this Warn if no user code on launch


It’s work for me.

Leave a comment

Your email address will not be published. Required fields are marked *

Loading...