2014-10-27 6 views
10

Dies ist ein C# -Webdienstprojekt in Visual Studio, das seit einigen Jahren existiert. Heute hat es beim Start in Visual Studio eine Ausnahme ausgelöst, aber nur wenn der Debugger angeschlossen ist.Starten des aspx SOAP-Dienstprojekts in Visual Studio 2013 Ursachen StackOverflowException

Die Ausnahme ist:

System.StackOverflowException was unhandled 
Message: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll 

Dies ist Visual Studio 2013 Update 3

Relevante Abschnitt Stack-Trace:

System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.JsonDataContract.WriteJsonValue(System.Runtime.Serialization.XmlWriterDelegator jsonWriter, object obj, System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson context, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, bool isDeclaredType, bool writeXsiType, int declaredTypeID, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, bool isDeclaredType, bool writeXsiType, int declaredTypeID, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
[Lightweight Function] 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.JsonDataContract.WriteJsonValue(System.Runtime.Serialization.XmlWriterDelegator jsonWriter, object obj, System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson context, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, bool verifyKnownType, System.RuntimeTypeHandle declaredTypeHandle, System.Type declaredType) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.SerializeWithXsiType(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, System.RuntimeTypeHandle objectTypeHandle, System.Type objectType, int declaredTypeID, System.RuntimeTypeHandle declaredTypeHandle, System.Type declaredType) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, bool isDeclaredType, bool writeXsiType, int declaredTypeID, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, bool isDeclaredType, bool writeXsiType, int declaredTypeID, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
[Lightweight Function] 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(System.Runtime.Serialization.XmlWriterDelegator jsonWriter, object obj, System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson context, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.JsonDataContract.WriteJsonValue(System.Runtime.Serialization.XmlWriterDelegator jsonWriter, object obj, System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson context, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, System.RuntimeTypeHandle declaredTypeHandle) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObjectContent(System.Runtime.Serialization.XmlWriterDelegator writer, object graph) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObject(System.Runtime.Serialization.XmlWriterDelegator writer, object graph) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(System.Runtime.Serialization.XmlWriterDelegator writer, object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(System.Xml.XmlDictionaryWriter writer, object graph) Unknown 
System.Runtime.Serialization.dll!System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(System.IO.Stream stream, object graph) Unknown 
Microsoft.VisualStudio.Web.PageInspector.Runtime.dll!Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.JsonUtility.Serialize(object data, System.IO.Stream outputStream) Unknown 
Microsoft.VisualStudio.Web.PageInspector.Runtime.dll!Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler.System.Web.IHttpHandler.ProcessRequest(System.Web.HttpContext context) Unknown 
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Unknown 
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Unknown 
System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error) Unknown 
System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb) Unknown 
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context) Unknown 
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown 
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown 
[Native to Managed Transition] 
[Managed to Native Transition] 
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown 
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown 
[AppDomain Transition] 

Antwort

16

Der folgende Eintrag in die web.config verhindert hinzugefügt Dieses Problem:

<appSettings> 
    <!-- Turn-off VS2013 BrowserLink feature which causes issues when Debugging --> 
    <add key="vs:EnableBrowserLink" value="false" /> 
+3

Wow, ich habe mir eine Stunde lang den Kopf darüber gekratzt, um herauszufinden, wo zur Hölle ich eine Endlosschleife verursacht habe! Das Problem ist nach dem Deaktivieren von BrowserLink verschwunden, danke. BTW Sie können es auch von der VS-Symbolleiste deaktivieren, indem Sie auf den kleinen Pfeil neben "↺" klicken –

+3

@Saeb: Hinzufügen zu der web.config stellt sicher, dass das Problem nicht von anderen an dem gleichen Projekt begegnet. – misha

+0

@misha guter Punkt. –

0

Die Antwort von redcalx ist korrekt.

Dieses Problem besteht noch in der "neuesten" Version von Visual Studio (2015). Ich lief hinein und dachte, könnte es auch versuchen, weil ich völlig aus Ideen bin.

Nun, es hat funktioniert, ich bin so dankbar.

Versionsinformationen: Microsoft Visual Studio Enterprise 2015 Version 14.0.25425.01 Update 3 Microsoft .NET Framework Version 4.6.01586

installierte Version: Unternehmen Architektur und Modellierungstools 00322-80000-00000 Werkzeuge -AA466 Microsoft Architektur und Modellierung

Visual C# 2015 00322-80000-00000-AA466 Microsoft Visual C# 2015 ASP.NET und Web-Tools 2015,1 (Beta8) 14.1.11107.0 ASP.NET und Web-Tools 2015,1 (Beta8)

ASP.NET Web Frameworks und Werkzeuge 2012,2 4.1.41102.0

ASP.NET Web Frameworks und Tools 2013 5.2.40314.0