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?
Related
I recently noticed that most of the databases on my SQL Server are getting the Recovery Pending status after running for a few hours (sometimes 6, sometimes more). I can't imagine this being the expected outcome, so I decided to post about it here.
I opened the Event Log viewer and decided to find some more info about what's going on. It seems that all my databases are "Starting up" every few minutes or so (as cam be seen here). Some of them get started multiple times in a row. Is that supposed to work like that?
After scrolling a bit more, I found this warning from one of my IIS websites:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/11/2018 9:32:05 AM
Event time (UTC): 4/11/2018 7:32:05 AM
Event ID: 7911bb726cd34d36941e8232ad78b059
Event sequence: 18
Event occurrence: 3
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/5/ROOT-1-131679051910980983
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\x\
Machine name: WIN-IV6CMBTUQ4N
Process information:
Process ID: 2400
Process name: w3wp.exe
Account name: IIS APPPOOL\x
Exception information:
Exception type: HttpException
Exception message: The remote host closed the connection. The error code is 0x80070057.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data)
at Microsoft.AspNet.SignalR.Hosting.ResponseExtensions.End(IResponse response, String data)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.<>c__DisplayClass2_0.<RunTask>b__0(Task t)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://91.134.116.40:8003/signalr/start?clientProtocol=1.4&transport=webSockets&connectionData=[{"Name":"ChatHub"}]&connectionToken=/y39a+1XOv/u7X/ZFYw5ACLQu58FVNl0hbkMwPHCw1EQ9gdCbpFxPQzPuJVDxRywoP2AaI6akuXxQIxM2Wwa0OLO4cWd/e3csUBetjb9nROsisQnavw52ulTHWVOjK/j&user=User-14D
Request path: /signalr/start
User host address: 24.13.101.142
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\x
Thread information:
Thread ID: 14
Thread account name: IIS APPPOOL\x
Is impersonating: False
Stack trace: at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data)
at Microsoft.AspNet.SignalR.Hosting.ResponseExtensions.End(IResponse response, String data)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.<>c__DisplayClass2_0.<RunTask>b__0(Task t)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
Seems like there's something wrong with SignalR, so it shouldn't have any direct relation with the database, but there aren't any other errors/warnings there.
Am I missing something here?
Thank you!
Do you have "auto close" enabled on the database?
Best practice is to have it OFF
ALTER DATABASE <mydb> SET AUTO_CLOSE OFF
I would also check AUTO_SHRINK while I was there
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); }
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).
I am creating Costume DNN Module but I have "General Exception" happening recently. just want to ask if anyone get this error " General Exception" and how to fix it
AssemblyVersion: 7.0.5
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL:
AbsoluteURL:
AbsoluteURLReferrer:
UserAgent:
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID: 19286ea9-9154-4453-93d3-f58e3e143f64
InnerException: Error Creating BusinessControllerClass 'DotNetNuke.Modules.ResourceModule.Components.FeatureController' of module(ResourceModule) id=(637) in tab(144) and portal(0)
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Activator.CreateInstance
StackTrace:
Message: System.Exception: Error Creating BusinessControllerClass 'DotNetNuke.Modules.ResourceModule.Components.FeatureController' of module(ResourceModule) id=(637) in tab(144) and portal(0) ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at DotNetNuke.Services.Search.ModuleIndexer.GetModuleList(Int32 PortalID) --- End of inner exception stack trace --- at DotNetNuke.Services.Search.ModuleIndexer.GetModuleList(Int32 PortalID)
Source:
Server Name:
That is an easy one, fixed in the next Template release. https://christoctemplate.codeplex.com/discussions/440995
Basically, update your .DNN file to include the proper namespace for your BusinessController class, I left a hardcoded one in there by mistake in one of the templates.
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.