Microsoft.Practices.Unity.ResolutionFailedException - unity-container

After installing my WPF application and I try to run the application it crashes and records the error below in the Event Viewer. Anyone has ideas?
'----------------------------------------------------------------------
Application: MyApp.Windows.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Practices.Unity.ResolutionFailedException
Stack:
at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(System.Type, System.Object, System.String, System.Collections.Generic.IEnumerable`1<Microsoft.Practices.Unity.ResolverOverride>)
at Microsoft.Practices.Unity.UnityContainer.Resolve(System.Type, System.String, Microsoft.Practices.Unity.ResolverOverride[])
at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.Practices.Unity.IUnityContainer, Microsoft.Practices.Unity.ResolverOverride[])
at MyApp.Windows.IoC.Resolve[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at MyApp.Windows.Navigation.NavigationController.Navigate(System.String, System.Windows.Controls.UserControl)
at MyApp.Windows.LoginWindow..ctor()
at MyApp.Windows.App.OnStartup(System.Windows.StartupEventArgs)
at System.Windows.Application.<.ctor>b__1(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.runTryCode(System.Object)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at MyApp.Windows.App.Main()

I know this thread is pretty old now, but I just wanted to say I just had the same exact exception, and the solution was also pretty much the same.
The event viewer had the same output as in Joe's case.
I managed to catch the exception in VS and it showed me a "ResolutionFailedException while setting value for property Views.MainWindow".
The real problem however was that entity framework tried to build the SqlCE database in a directory that did not exist.. Pretty basic, but the exception was so weird I though i would share my findings.

Related

ASP.NET Session - Internal ArrayList exception

We have a web based application developed using the .NET framework 4 and ASP.NET MVC.When you set an item to a session in a section of the code, we are faced with an internal exception directly from mscorlib which causes our application to work unexpectedly.The fault stack trace is as follows;
0:072> !clrstack
OS Thread Id: 0x31ec (72)
Child SP IP Call Site
000000aea766d968 000007f9736a4650 [HelperMethodFrame: 000000aea766d968]
000000aea766da50 000007f9674e0e5a System.Collections.ArrayList.Add(System.Object)
000000aea766da90 000007f966655292 System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(System.String, System.Object)
000000aea766dae0 000007f9650ac4c9 System.Web.SessionState.SessionStateItemCollection.set_Item(System.String, System.Object)
000000aea766db20 000007f90ed89ce9 UTL.WebStateManager.set_Item(System.String, System.Object)
000000aea766dbf0 000007f90f29370c WebStateManagerHelper.get_OriginalPNR()
000000aea766dc80 000007f90f29242d QueryDynamicLoggingComponent.LogTransaction(System.String, System.String)
000000aea766e110 000007f90f2917e3 WSHelper.Log(System.String, System.String, Boolean, System.String)
000000aea766e160 000007f90f28fd17 WSHelper.GetResponse(System.String, SecurityInfo, System.String, System.String, System.String ByRef, System.String, System.String)
000000aea766e5d0 000007f90f29eae6 WSHelper.SendQuery(System.String, SecurityInfo, System.String)
000000aea766e7f0 000007f90f29e7f8 WSHelper.SendQuery(SecurityInfo, System.String)
000000aea766e840 000007f90f29e4af APIWSPool.SendAndReceiveQueryToString(Agency, System.String, Token, Boolean)
000000aea766e940 000007f90f29e374 APIWSPool.SendAndReceiveQuery(Agency, Token, Boolean)
000000aea766e9b0 000007f90f6168f4 FlightBookingManager.SearchFlightForMPSearchedFlightRecommendations1(Agency, FlightFareDrivenSearchInfo, Boolean)
000000aea766eb80 000007f90f615ec1 ApiFlightBookingProvider.SearchFlightForMPSearchedFlightRecommendations1(Agency, FlightFareDrivenSearchInfo, Boolean)
000000aea766ebe0 000007f90f6158f2 APICOM.Threading.OWCOutboundSearchThread.Work()
000000aea766edb0 000007f9674e2d45 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
000000aea766ef10 000007f9674e2ab9 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
000000aea766ef40 000007f9674e2a97 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
000000aea766ef90 000007f9674fa161 System.Threading.ThreadHelper.ThreadStart()
000000aea766f2a8 000007f96e0eab53 [GCFrame: 000000aea766f2a8]
000000aea766f5f8 000007f96e0eab53 [DebuggerU2MCatchHandlerFrame: 000000aea766f5f8]
000000aea766f788 000007f96e0eab53 [ContextTransitionFrame: 000000aea766f788]
000000aea766f9a8 000007f96e0eab53 [DebuggerU2MCatchHandlerFrame: 000000aea766f9a8]
When I run !dso in the thread I am receiving the error and look at the ArrayList that the Session uses, I can't see any problem.
0:072> !DumpObj /d 000000adb1348540
Name: System.Collections.ArrayList
MethodTable: 000007f967727868
EEClass: 000007f967109b60
Size: 40(0x28) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
MT Field Offset Type VT Attr Value Name
000007f9676b31c0 4000c2f 8 System.Object[] 0 instance 000000abf0b6ec10 _items
000007f967722238 4000c30 18 System.Int32 1 instance 17 _size
000007f967722238 4000c31 1c System.Int32 1 instance 17 _version
000007f96771fca0 4000c32 10 System.Object 0 instance 0000000000000000 _syncRoot
000007f9676b31c0 4000c33 5e8 System.Object[] 0 shared static emptyArray
>> Domain:Value 000000ab6a93ba10:000000ac6b0b23c0 000000aea416c820:000000ac2b1f8730 <<
0:072> !DumpObj /d 000000abf0b6ec10
Name: System.Object[]
MethodTable: 000007f9676b31c0
EEClass: 000007f9671078f8
Size: 288(0x120) bytes
Array: Rank 1, Number of elements 32, Type CLASS (Print Array)
Fields:
None
0:072> !DumpArray /d 000000abf0b6ec10
Name: System.Object[]
MethodTable: 000007f9676b31c0
EEClass: 000007f9671078f8
Size: 288(0x120) bytes
Array: Rank 1, Number of elements 32, Type CLASS
Element Methodtable: 000007f96771fca0
[0] 000000adb1348b90
[1] 000000adb1348c08
[2] 000000adb137e268
[3] 000000adb137e348
[4] 000000adb137e5c8
[5] 000000adb137e6b0
[6] 000000adb137e8d0
[7] 000000adb137ea98
[8] 000000adb137eb48
[9] 000000adb13f57d8
[10] 000000adb13f5a78
[11] 000000adb13f5b08
[12] 000000adb13f9018
[13] 000000adb13f9470
[14] 000000adb14b7618
[15] 000000abf0b6e4d8
[16] 000000abf0b6ebf0
[17] null
[18] null
[19] null
[20] null
[21] null
[22] null
[23] null
[24] null
[25] null
[26] null
[27] null
[28] null
[29] null
[30] null
[31] null
We know that the Session is not thread-safe for some operations.When we analyzed dumps we didn't see any other thread trying to access the same session object.We checked the source code of .NET in referencesource.microsoft.com and we think that it is a related an error indexing the internal array of the ArrayList.I'm not sure, but it seems to have a memory problem.Any ideas?

How can I specify the ASP.NET probing path for automatic C++/CLI appdomains?

I have a C++/CLI DLL that needs to run in the context of an ASP.NET WebApi action.
The action is affected by an ActionFilter that uses log4net's LogicalThreadContext to set a property containing a request ID; this works nicely to write the request ID into the log entries.
The problem is that ASP.NET seems to be creating an appdomain when it's time to load the class from the C++/CLI dll. (I can't seem to find any documentation on how that works; I'd love to find some.) When the appdomain plumbing tries to deserialize everything, it chokes because it can't find log4net.dll (see stack trace below).
Fusion logs show that it's looking in C:\Windows\System32\inetsrv, which is incorrect... I would expect it to look in the probing path or along the %PATH% environment variable.
A few data points:
log4net.dll is available in the web app's bin directory and works fine for everything else I'm using it for.
The C++/CLI code has no dependencies on log4net.
If I comment out my calls to log4net.LogicalThreadContext.Properties[...], everything works fine.
If I copy log4net.dll from my bin folder to C:\Windows\system32\inetsrv, everything works fine.
The web.config file specifies the probing path with a <probing privatePath="bin"/> element.
My Application_Start method in global.asax.cs prepends the web app's bin directory to the %PATH% environment variable:
var currentPathEnvVar = Environment.GetEnvironmentVariable("PATH");
var binPath = Path.Combine(Server.MapPath("~") ?? String.Empty, "bin");
_log.DebugFormat("Prepending paths to PATH: [{0}]", binPath);
Environment.SetEnvironmentVariable("PATH", String.Concat(binPath, Path.PathSeparator, currentPathEnvVar));
The log shows that the %PATH% is getting prepended correctly:
2015-06-05 17:07:48,816 1 DEBUG MyNamespace.WebApiApplication (null) Prepending paths to PATH: [C:\Program Files\MyCompany\MyApp\web\bin]
So how do I get the appdomain that ASP.NET creates to look in the right place to load assemblies?
Thanks.
Here's the stack trace that gets logged when all this goes down.
2015-06-05 17:08:41,148 23 ERROR MyNamespace.MyController (null) Controller action failed
System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
---> System.Runtime.Serialization.SerializationException: Unable to find assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.
Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.FixupForNewAppDomain()
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.AppDomain.IsDefaultAppDomain()
at <CrtImplementationDetails>.GetDefaultDomain() in f:\dd\vctools\crt\crtw32\h\minternal.h:line 367
at <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie) in f:\dd\vctools\crt\crtw32\h\minternal.h:line 401
at <CrtImplementationDetails>.DefaultDomain.Initialize() in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 278
at <CrtImplementationDetails>.LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* ) in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 343
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 546
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 703
--- End of inner exception stack trace ---
at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException) in f:\dd\vctools\crt\crtw32\h\minternal.h:line 194
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 713
at .cctor() in f:\dd\vctools\crt\crtw32\msilcrt\mstartup.cpp:line 754
--- End of inner exception stack trace ---
at MyNamespace.MyController.MyAction(String foo, Int64 bar, String baz)
This helped me to resolve similar issue:
https://blogs.msdn.microsoft.com/jorman/2007/08/31/loading-c-assemblies-in-asp-net/
Faced option 2.a and proposed solution worked fine:
protected void Application_Start(object sender, EventArgs e){
String _path = String.Concat(System.Environment.GetEnvironmentVariable("PATH"), ";",
System.AppDomain.CurrentDomain.RelativeSearchPath);
System.Environment.SetEnvironmentVariable("PATH", _path, EnvironmentVariableTarget.Process); }

Biztalk Error in WCF OracleDBBinding

I used the Consume Adapter Service to create the OrcaleDBBinding to access 3 views from DB. When I tried to test the project I am getting error like,
The adapter failed to transmit message going to send port "XYZ_DEF_WcfSendPort_OracleDBBinding_Multiple_Custom" with URL "oracledb://abcd.def/". It will be retransmitted after the retry interval specified for this Send Port.
Details:"Microsoft.ServiceModel.Channels.Common.MetadataException: Argument
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="Select1" Action="http://Microsoft.LobServices.OracleDB/View/EMPEXPORT/Select" />
<Operation Name="Select2" Action="http://Microsoft.LobServices.OracleDB/View/JOBEXPORT/Select" />
<Operation Name="Select3" Action="http://Microsoft.LobServices.OracleDB/View/POSITIONEXPORT/Select" />
</BtsActionMapping> is invalid.
Server stack trace:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
In the oracleDBbinding I even changed the following property
"enableBizTalkCompatibilityMode" = True
"useAmbientTransaction" = False
But getting the same error.Can anybody help me, why am I getting this error. Thanks.
The Problem was because I changed the operations in the Logical Ports,which was different from Select. When I changed that to Select it worked.

IIS 7 Faulting application name: w3wp.exe

We have created a website using WCSF framework and .NET 2.0.
Currently this application is live and used by more than 1000 users. We have deployed this in a cloud in IIS 7 under Windows 2008 Server R2. We also use Sql Server 2008 R2 database for the backend. The deployment architecture is as described below.
There are two web servers connected under a load balancer (Hardware based) using sticky sessions. These two servers communicates with two database servers with more than 600 databases scattered evenly between them. All requests will first go to a admin database which redirects to the appropriate db server.
Now to the issue....
We are getting around 4 to 5 w3wp crashes per day in both the servers. During this time all the users connected to the application will be logged out.
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time
stamp: 0x4ce7afa2 Faulting module name: KERNELBASE.dll, version:
6.1.7601.18229, time stamp: 0x51fb1677 Exception code: 0xe053534f Fault offset: 0x000000000000940d Faulting process id: 0x%9 Faulting
application start time: 0x%10 Faulting application path: %11 Faulting
module path: %12 Report Id: %13
Recently we opened a case with MS and their comments is given below.
---Begin Microsoft response---
The process crashed due to Stack Overflow issue.
.Net Call Stack:
System.Enum.System.IConvertible.ToInt64(System.IFormatProvider)
System.Convert.ToInt64(System.Object, System.IFormatProvider)
System.Enum.ToUInt64(System.Object)
System.Enum.IsDefined(System.Type, System.Object)
Microsoft.Practices.ObjectBuilder.Locator.Get(System.Object, Microsoft.Practices.ObjectBuilder.SearchMode)
Microsoft.Practices.ObjectBuilder.ReadableLocator.Get[[System.__Canon, mscorlib]](System.Object)
<Trimmed>
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Full Call Stack
We are seeing that the call is made for the URL :- ASP.xxxdashboards_recordlistview_aspx
ntdll!ZwTerminateProcess
KERNELBASE!TerminateProcess+2f
mscorwks!EEPolicy::HandleFatalStackOverflow+13b
mscorwks!EEPolicy::HandleStackOverflow+212
mscorwks!CLRVectoredExceptionHandler+3de1be
mscorwks!CLRVectoredExceptionHandlerShim+42
ntdll!RtlpCallVectoredHandlers+a8
ntdll!RtlDispatchException+22
ntdll!KiUserExceptionDispatch+2e
KERNELBASE!RaiseException+39
mscorwks!AllocateObject+34aeb1
mscorwks!MethodTable::FastBox+43
mscorwks!MethodTable::Box+5b
mscorwks!ReflectionEnum::InternalGetEnumValue+139
System.Enum.System.IConvertible.ToInt64(System.IFormatProvider)+b
System.Convert.ToInt64(System.Object, System.IFormatProvider)+35
System.Enum.ToUInt64(System.Object)+9d
System.Enum.IsDefined(System.Type, System.Object)+ff
Microsoft.Practices.ObjectBuilder.Locator.Get(System.Object, Microsoft.Practices.ObjectBuilder.SearchMode)+4d
Microsoft.Practices.ObjectBuilder.ReadableLocator.Get[[System.__Canon, mscorlib]](System.Object)+10
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+11f
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
<Trimmed>
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderBase`1[[Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage, Microsoft.Practices.CompositeWeb]].DoBuildUp(Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Type, System.String, System.Object, Microsoft.Practices.ObjectBuilder.PolicyList[])+13a
Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderBase`1[[Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage, Microsoft.Practices.CompositeWeb]].BuildUp(Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Type, System.String, System.Object, Microsoft.Practices.ObjectBuilder.PolicyList[])+64
Microsoft.Practices.CompositeWeb.CompositionContainer.BuildItem(Microsoft.Practices.ObjectBuilder.IBuilder`1<Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage>, Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Object)+334
Microsoft.Practices.CompositeWeb.WebClientApplication.BuildItemWithCurrentContext(System.Object)+121
Microsoft.Practices.CompositeWeb.Web.UI.UserControl.OnInit(System.EventArgs)+3f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+8f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.AddedControl(System.Web.UI.Control, Int32)+10f
DevExpress.Web.ASPxTabControl.Internal.PCContentsControl.CreateControlHierarchy()+2ae
DevExpress.Web.ASPxClasses.ASPxWebControlBase.CreateChildControls()+33
<Trimmed>
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControlBase.DevExpress.Web.ASPxClasses.Internal.IASPxWebControl.EnsureChildControls()+d
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+3e
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+d0
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControlsRecursive(System.Web.UI.Control)+25
DevExpress.Web.ASPxClasses.ASPxWebControl.CreateChildControls()+166
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControlBase.DevExpress.Web.ASPxClasses.Internal.IASPxWebControl.EnsureChildControls()+d
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+3e
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+d0
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControlsRecursive(System.Web.UI.Control)+25
DevExpress.Web.ASPxClasses.ASPxWebControl.CreateChildControls()+166
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControl.InitInternal()+48
DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.OnInit(System.EventArgs)+1c
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+8f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)+5c5
System.Web.UI.Page.ProcessRequest(Boolean, Boolean)+a0
System.Web.UI.Page.ProcessRequest()+5b
System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)+f0
ASP.xxxdashboards_recordlistview_aspx.ProcessRequest(System.Web.HttpContext)+9
We are seeing the following code in a tight recursive loop which is eventually leading into StackOverflow situation.
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Further, they also added the following.
Looked into the code to see the infinite loop and here seems to be the case
Inside Microsoft_Practices_CompositeWeb!Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy
public override object BuildUp(IBuilderContext context, Type typeToBuild, object existing, string idToBuild)
{
ISessionStateLocatorService service = context.Locator.(object);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.Practices.ObjectBuilder:1.0.51206.0:b03f5f7f11d50a3a/Microsoft.Practices.ObjectBuilder.IReadableLocator/Get<>(Object):"Get<ISessionStateLocatorService>(new DependencyResolutionLocatorKey(typeof(ISessionStateLocatorService), null));
if (service != null)
{
IHttpSessionState sessionState = service.GetSessionState();
foreach (FieldInfo info in typeToBuild.GetFields())
{
this.SetFieldValue(existing, info, sessionState);
}
}
return base.BuildUp(context, typeToBuild, existing, idToBuild);
}
So this calls the BuildUp defined in Microsoft_Practices_ObjectBuilder!Microsoft.Practices.ObjectBuilder.BuilderStrategy
public virtual object BuildUp(IBuilderContext context, Type typeToBuild, object existing, string idToBuild)
{
IBuilderStrategy nextInChain = context.GetNextInChain(this);
if (nextInChain != null)
{
return nextInChain.BuildUp(context, typeToBuild, existing, idToBuild);
}
return existing;
}
This results in infinite loop.
---End Microsoft response---
We are not sure where to look for the issue at the moment and if anybody could help us to solve the issue it would be very much appreciated.
I had a similar problem with IIS Crash and exception code "0xc00000fd". I recommend that you catch a crash dump.
1) Install a software to get a crash dump. I recommend the DebugDiag Tools.
2) After the installation, configure the DebugDiag Tool following these instructions:
Selecting a Crash rule Selecting a IIS App pool (w3wp.exe)
Selecting the app pool of application
Configuring a Stack over flow
exception (0xc00000fd) in Advanced Settings/Exceptions and finish
the setup.
3) Wait for a first crash dump to be created in folder location. Ex: C:\DebugDiag\Logs. When the crash dump was created, use the DebugDiag Analysis to open the file from C:\DebugDiag\Logs and a HTML report will be created.
4) In report you see quickly the problem in analysis summary on the top of the page. In my case, there was a recursive function without stop conditional that leading the app poll fall.

What does GCFrame mean in output of !clrstack command in WinDBG?

Can somebody help me with answering my 2 questions below?
What does GCFrame mean in !clrStack output?
What does System.IndexOutOfRangeException..ctor() showing in the stack mean? Does it mean there is actually exception on thread?
0:023> !clrstack
OS Thread Id: 0xe1c (23)
Child SP IP Call Site
0000000005cab978 000007fef909caf6 [HelperMethodFrame_PROTECTOBJ: 0000000005cab978] System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean)
0000000005cabb50 000007fef80316ce System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(System.String, System.Globalization.CultureInfo, System.Version, Boolean, System.Threading.StackCrawlMark ByRef)
0000000005cabbc0 000007fef8031357 System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo, System.Threading.StackCrawlMark ByRef)
0000000005cabc50 000007fef8038972 System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceSet>, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
0000000005cabd10 000007fef8038678 System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
0000000005cabdd0 000007fef8038403 System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean)
0000000005cabe20 000007fef8037fcc System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)
0000000005cabec0 000007fef803e10b System.Environment+ResourceHelper.GetResourceStringCode(System.Object)
0000000005cac608 000007fef903ee74 [HelperMethodFrame_PROTECTOBJ: 0000000005cac608] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
0000000005cac730 000007fef803dd88 System.Environment+ResourceHelper.GetResourceString(System.String, System.Globalization.CultureInfo)
0000000005cac780 000007fef803e5b8 System.Environment.GetResourceStringLocal(System.String)
0000000005cacb98 000007fef903ee74 [ContextTransitionFrame: 0000000005cacb98]
0000000005cacb58 000007fef903ee74 [GCFrame: 0000000005cacb58]
0000000005cacdb8 000007fef903ee74 [HelperMethodFrame_2OBJ: 0000000005cacdb8] System.Environment.GetResourceFromDefault(System.String)
0000000005cacee0 000007fef870fc58 System.IndexOutOfRangeException..ctor()
0000000005cad2c8 000007fef903ee74 [GCFrame: 0000000005cad2c8]
0000000005cad468 000007fef903ee74 [GCFrame: 0000000005cad468]
0000000005cad5c0 000007fef903ee74 [GCFrame: 0000000005cad5c0]
0000000005cad978 000007fef903ee74 [HelperMethodFrame: 0000000005cad978] System.Buffer.InternalBlockCopy(System.Array, Int32, System.Array, Int32, Int32)
0000000005cadab0 000007fef807c705 System.IO.StreamWriter.Write(Char[], Int32, Int32)
0000000005cadb10 000007fef807ba5c System.IO.TextWriter.WriteLine(System.String)
0000000005cadb70 000007fef807c9ff System.IO.TextWriter+SyncTextWriter.WriteLine(System.String)
0000000005cadbc0 000007ff0021a74e log4net.Util.LogLog.EmitOutLine(System.String)
0000000005cadc10 000007ff00223fdf log4net.Appender.FileAppender.OpenFile(System.String, Boolean)
0000000005cadc90 000007ff00223b31 log4net.Appender.RollingFileAppender.OpenFile(System.String, Boolean)
0000000005cadd10 000007ff00223837 log4net.Appender.FileAppender.SafeOpenFile(System.String, Boolean)
0000000005cadd70 000007ff005daec3 log4net.Appender.TextWriterAppender.PreAppendCheck()
0000000005caddb0 000007ff005dabc1 log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)
0000000005cade10 000007ff005da910 log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent)
0000000005cade90 000007ff005da511 log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent)
0000000005cadf10 000007ff005da12b log4net.Repository.Hierarchy.Logger.Log(System.Type, log4net.Core.Level, System.Object, System.Exception)
0000000005cadf80 000007ff005de0f2 log4net.Core.LogImpl.DebugFormat(System.String, System.Object[])
0000000005cadff0 000007ff005ddfb0 Secure.Utility.LogHelper.DebugFormat(System.String, System.Object[])
0000000005cae060 000007ff005ded4d Secure.Portal.Messaging.GenericProcessor.OnMessageReceive(WaveSecure.Messaging.GatewayProvider, System.String, System.String, System.String, System.String, WaveSecure.EventInitiatorTypeList, System.Web.HttpContext)
0000000005cae360 000007ff005dbc3e Secure.Portal.Handlers.XmlServiceMessageHandler.ProcessRequest(System.Web.HttpContext)
0000000005cae420 000007fef0f1f831 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
0000000005cae500 000007fef0eec26e System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
0000000005cae5d0 000007fef168cff5 System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)
0000000005cae690 000007fef15b0bf5 System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)
0000000005cae6e0 000007fef1592576 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
0000000005cae780 000007fef167df1f System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
0000000005cae920 000007fef167e3f2 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
0000000005cae970 000007fef167d141 DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
0000000005caf228 000007fef90e62e7 [NDirectMethodFrameStandalone: 0000000005caf228] System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef)
0000000005caf1f0 000007fef162ff47 DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)
0000000005caf2c0 000007fef167e054 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
0000000005caf460 000007fef167e3f2 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
0000000005caf4b0 000007fef167d141 DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
0000000005caf718 000007fef90e654b [ContextTransitionFrame: 0000000005caf718]
The exception is in the process of being constructed -- its constructor is currently running. It is probably being thrown by the BlockCopy method (you can inspect it in Reflector to see under which conditions it throws this exception). In the process of running the constructor, a satellite resource assembly is being loaded to get a string (which is probably the human-readable exception message).

Resources