ASP.NET MVC Silverlight的通信 [英] ASP.NET MVC to Silverlight Communication

查看:102
本文介绍了ASP.NET MVC Silverlight的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有一个ASP.NET MVC Web应用程序,嵌入了Silverlight应用程序,我想的SL客户端通过一个SL数据库进行通信启用WCF服务运行的 的内部在ASP.NET MVC应用程序。我在得到这个工作,没有运气,Silverlight应用程序获取服务引用WCF服务就好了。当我运行Silverlight客户端,并调用Web服务它返回一个未发现异常每一次。我可以通过调试的WCF服务不会被调用看,但Silverlight的错误并没有被传递回来。

So I have an ASP.NET MVC web application that has a silverlight application embedded in it and I'd like the SL client to communicate with the database through a SL enabled WCF service that runs inside the ASP.NET MVC application. I have had no luck in getting this to work, the silverlight application gets a service reference to the WCF service just fine. When I run the silverlight client and call the web service it returns a NOT FOUND exception every single time. I can see through debugging that the WCF service does get called, but the silverlight errors out and nothing gets passed back.

我也尝试启用

serviceDebug includeExceptionDetailInFaults =真正的

serviceDebug includeExceptionDetailInFaults="true"

但我仍然得到未发现异常。有什么想法?

But I still get the NOT FOUND exception. Any thoughts?

推荐答案

我能算出这个 - 我使用作为数据契约的对象并没有这样的标记,即使它们是由Silverlight应用程序接受并通过他们总是通过这个验收规范WCF服务后返回服务引用生成的。

I was able to figure this out - the objects I was using as data contracts were not marked as such and even though they were "accepted" by the silverlight app and were generated by the service reference they would always through this acception after the WCF service returned.

这篇关于ASP.NET MVC Silverlight的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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