2014-10-27 22 views
10

Đây là dự án dịch vụ web C# trong Visual Studio đã tồn tại trong một số năm. Hôm nay nó bắt đầu ném một ngoại lệ khi khởi động trong Visual Studio, nhưng chỉ khi trình gỡ lỗi được đính kèm.Khởi chạy dự án dịch vụ SOX SOAP trong Visual Studio 2013 Nguyên nhân StackOverflowException

Trường hợp ngoại lệ là:

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

Đây là Visual Studio 2013 Update 3.

phần có liên quan của 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] 

Trả lời

16

Các mục sau đây bổ sung vào ngăn chặn web.config vấn đề này:

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

Chà, tôi đã gãi đầu trong vòng một giờ để tìm nơi tôi đã gây ra một vòng lặp vô hạn trong địa ngục! Vấn đề đã biến mất sau khi vô hiệu hóa BrowserLink, cảm ơn. BTW bạn cũng có thể vô hiệu hóa nó từ thanh công cụ VS bằng cách nhấp vào mũi tên nhỏ bên cạnh "↺" –

+3

@Saeb: Thêm nó vào web.config đảm bảo rằng vấn đề không gặp phải bởi những người khác làm việc trên cùng một dự án. – misha

+0

@misha điểm tốt. –

0

Câu trả lời bằng redcalx là chính xác.

Sự cố này vẫn tồn tại trong phiên bản 'mới nhất' của Visual Studio (2015). Tôi chạy vào nó và nghĩ rằng, có thể như wel thử nó bởi vì tôi hoàn toàn ra khỏi ý tưởng.

Vâng, nó hoạt động, tôi rất biết ơn.

Version thông tin: Microsoft Visual Studio Enterprise 2015 Version 14.0.25425.01 Cập nhật 3 Microsoft .NET Framework Version 4.6.01586

Version cài đặt: Doanh nghiệp Kiến trúc và mô hình hóa Công cụ 00322-80000-00000 -AA466 Công cụ tạo mô hình và kiến ​​trúc của Microsoft

Visual C# 2015 00322-80000-00000-AA466 Microsoft Visual C# 2015 ASP.NET và Web Công cụ 2015,1 (beta8) 14.1.11107.0 ASP.NET và Web Công cụ 2015,1 (beta8)

ASP.NET Web Khung và Công cụ 2012,2 4.1.41102.0

ASP.NET Web Frameworks và Công cụ 2013 5.2.40314.0

Các vấn đề liên quan