WcfSvcHost.exe每个 WCF 项目 VS2013 上的访问冲突异常

本文关键字:访问冲突 异常 VS2013 项目 exe 每个 WCF WcfSvcHost | 更新日期: 2023-09-27 18:32:43

我在VS2013中有这样的问题:

每当我尝试调试 WCF 库项目时,都会在启动时收到错误:

WcfSvcHost.exe 中发生了类型为">System.AccessViolationException"的未处理异常。

即使尝试从模板调试新的 WCF 项目,也是一样的 - 不起作用。事件查看器:

.NET 运行时异常
App: WcfSvcHost.exe
版本:v4.0.30319
异常:System.AccessViolationException

叠:

in System.Net.UnsafeNclNativeMethods.SetFileCompletionNotificationModes(CriticalHandle handle, FileCompletionNotificationModes modes)
in System.Net.HttpListener.CreateRequestQueueHandle()
in System.Net.HttpListener.Start()
in System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
in System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
in System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
in System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
in System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
in System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
in Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)
in Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(System.String)
in Microsoft.Tools.SvcHost.MainForm.theBackgroundWorker_DoWork(System.Object, System.ComponentModel.DoWorkEventArgs)
in System.ComponentModel.BackgroundWorker.WorkerThreadStart(System.Object)
in System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr, System.Object[], System.Object, System.Object[] ByRef)
in System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
in System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
in System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
in System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
in System.Threading.ThreadPoolWorkQueue.Dispatch()`

事件查看器中的应用程序错误:

导致应用错误:WcfSvcHost.exe,版本:12.0.21005.1,时间戳:0x524fc58b
导致错误的模块:内核基础.dll,版本:6.3.9600.17278,时间戳:0x53eebf2e
异常代码:0xe0434352
导致进程 ID:0x8d8
错误应用程序路径: C:''Program Files (x86(''Microsoft Visual Studio 12.0''Common7''IDE''WcfSvcHost.exe
错误模块路径:C:''Windows''system32''KERNELBASE.dll
Windows:8.1 Pro x64,所有可用的更新都在
VS 2013 专业版 12.0.31101.00 更新 4

我将非常感谢任何帮助,用这个把我的头撞在墙上。

WcfSvcHost.exe每个 WCF 项目 VS2013 上的访问冲突异常

在 Windows 8 上使用 WebApi'SignalR Owin 时遇到同样的HttpListener问题。

在我的代码中,我正在调用: WebApp.Start<Startup>(url);System.Net.UnsafeNclNativeMethods.SetFileCompletionNotificationModes 中引发访问冲突。

事实证明,"某些"第三方程序与Microsoft的 ifs winsock LSP 不兼容。对我来说,它是Lavasoft的"网络伴侣"。(卸载解决了问题(

看使用 .NET 4.5 连接到 SQL Server Azure 时发生握手异常

设置文件完成通知模式似乎无法正常工作

https://support.microsoft.com/en-us/kb/2568167

希望这有帮助。