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

我在VS2013中有这样的问题:

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

WcfSvcHost.exe中发生了未处理的“ System.AccessViolationException ”类型exception。

即使在尝试从模板调试新的WCF项目时也是如此 – 不起作用。 事件查看器:

.NET运行时exception
应用程序: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,ver:12.0.21005.1,timestamp:0x524fc58b
模块导致错误:KERNELBASE.dll,ver:6.3.9600.17278,timestamp:0x53eebf2e
exception代码: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 Pro版本12.0.31101.00更新4

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

在Windows 8上使用WebApi\SignalR Owin时遇到与HttpListener相同的问题。

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

事实certificate,“一些”第三方程序与微软的ifs winsock lsps不兼容。 对我来说,这是Lavasoft的“Web Companion”。 (哪个卸载修复了问题)

请参阅使用.NET 4.5连接到SQL Server Azure时发生的握手exception

SetFileCompletionNotificationModes似乎无法正常工作

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

希望这可以帮助。