WCF发现:接口未发现异常 [英] WCF discovery: Interface not found exception

查看:157
本文介绍了WCF发现:接口未发现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用.NET 4的发现在WCF。但无论我做什么,我得到这个不是很有用异常:

I'm trying to use .net 4's discovery in WCF. But no matter what I do, I'm getting this not very useful exception:


System.ArgumentException crossed a native/managed boundary
  Message=Interface not found.
  Source=mscorlib
  StackTrace:
       at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)
       at System.RuntimeType.GetInterfaceMap(Type ifaceType)
       at Microsoft.VisualStudio.Diagnostics.ServiceModelSink.ServiceMethodResolver.ResolveMethodInfo(Type implementationType, MethodInfo contractMethod)
       at Microsoft.VisualStudio.Diagnostics.ServiceModelSink.ServiceMethodResolver..ctor(ContractDescription contract, DispatchRuntime runtime, Message request, InstanceContext instanceContext)
  InnerException: 
 

(堆栈跟踪实际上是空的。)

(Stack trace is actually empty.)

击中继续,该方案呛了几秒钟,然后继续并显示正确的结果。这种情况甚至在微软提供的WCF的例子。我确信,只有未处理的异常在VS 2010中显示在例外窗口。

Hitting "continue", the program chokes for a few seconds, then continues and displays correct results. This happens even in Microsoft's supplied WCF examples. I made sure that only unhandled exceptions are displayed in the exceptions window in VS 2010.

我有不知道什么可能导致这一点,尤其是在考虑到该程序,除了造成异常短暂的休息完美的工作。

I've got no idea what might be causing this, especially considering the fact that the program does work perfectly except for short break caused by the exception.

的异常在使用发现每一个项目时,这两个由我创建和那些由微软在官方的WCF例子提供。这种事只有在我的机器,它工作正常,在我的同事的框。

The exception occurs in every project that uses Discovery, both those created by me and those supplied by Microsoft in the official WCF examples. It happens only on my machine, it works fine on my co-worker's box.

在我绝望I交叉张贴在的http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8e326b48-232c-4510-8194-aa9d4ba36829

In my desperation I cross-posted at http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8e326b48-232c-4510-8194-aa9d4ba36829

推荐答案

问题解决了。

我重新下载了范例和重新安装VS,但我这样做,之前并没有之前改变任何东西。所以,我没有线索,是什么原因造成或固定的问题。好运的人在未来同样的问题。

I redownloaded the examples and reinstalled VS but I did that before and it did not change anything before. So I've got no clue as to what caused or fixed the issue. Good luck to anyone with the same problem in the future.

这篇关于WCF发现:接口未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆