`
阿尔萨斯
  • 浏览: 4170016 次
社区版块
存档分类
最新评论

silverlight问题,笑死我了

 
阅读更多
http://silverlight.net/forums/t/10852.aspx
----------------------------------------------------------------------------------------
你好:喜欢Silverlight的朋友们
我已经建成了一个WCF的安全服务,它能验证并且返回验证标识等内容,并在验证后提供了调用接口以完成其它功能。现在,我想整合它到 Silverlight 2 Beta 1,但是在整合过程中遇到了一些问题。程序抛出了异常,并且我不能发现错在哪里。我已经找到很多文章,看了很多博客,etc etc etc etc关于SL2及WCF的文章(应当是四个等等吧,哈哈。笑死我了,俺以为俺不明白,没想到他也不懂),但是都没有解决这个问题。Hmm,请问谁能帮助我呢?

下面是
1.我将WCF宿主在IIS7(Vista)上,访问http://localhost/WCF/SecurityService.svc是正常的。
2.在一些控制台程序中,我能正常应用上面提供的服务。
3.我没有进行跨域访问,因为所有的应用都运行在http://localhost/.........这个域中。
---------

一个'System.ServiceModel.ProtocolException'异常在System.ServiceModel.dll中被抛出,但是在用户代码中无法捕捉到它。

Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode

----

上帝与我们同在,


================================================================================================

Hello Silverlight World,

I have successfully created a WCF security service which can authenticate users and return tokens etc, which can be used to call subsequent methods on the service interface. Now, I would like to integrate this with Silverlight 2 Beta 1, but I am facing problems getting the integration between SL2 and WCF to work. I keep gettting the exception below thrown at me and can't figure out what I am doing wrong. I have read articles, blogs etc etc etc etc. on SL2 and WCF, but nothing about this error. Hmm, please could someone help me with this one?

Here is where I am:

1) I'm hosting the WCF service in IIS7 (Vista) which works when I access http://localhost/WCF/SecurityService.svc

2) I can use the above service using a simple console app

3) I am not facing any cross-domain issues because everything runs on http://localhost/.........

-----

An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code

Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode

----

All the best,
Jan








你好, 简

我想你看到的这个错误可能是WEB Service抛出的,我经历过这种事Web Service抛出异常的错误并得到了类似的住处。你可以Debug Web Service,或者加上try...catch语句。

Nokola
=====================================================================
Hello Jan,

I think the error message you are seeing is because the web service throws an exception. I tried a web service throwing exception and got the same message. You could either debug the web service or put a try...catch and see if it works

Nokola








另一个可能性是服务的终结点地址不匹配。
========================
Another possible issue may be that the EndPointAddress of the service does not match with the address in the service configuration when you click on the service reference and select "configure". You will have to use the service client constructor that accepts Binding and EndpointAddress (not the default constructor). This might work.







我也遇到了相同的问题,Web Service在我的机器上(地址是正确的) .当我检查WEB SERVICE的时候,发现它工作得非常正常,还有哪些可能的情况呢?
谢谢
======================================================================
I have the same problem!

The web service is on my machine (the address is correct) and when I check the web service alone it works great. What else could it be?

Thanks,

Aviv.

I have the same problem!

The web service is on my machine (the address is correct) and when
I check the web service alone it works great. What else could it be?

Thanks,

Aviv.









For those who have problems with web services. Please refer to this quick start.

A few notes:

For WCF services, unfortunately currently Silverlight doesn't support configuration files. So you have to create the Binding and EndpointAddress in code. Refer to that quick start.

For ASMX services, the address is included in the proxy, so you don't need to do anything.

For WCF services, currently only BasicHttpBinding is supported.

For cross domain scenarios, you must create a policy file on the server. Refer to http://msdn2.microsoft.com/en-us/library/cc197955(VS.95).aspx for more information.

shanaolanxing - Please mark the posts as answers if they help and unmark if they don't.









对于在Web Services中遇到问题的朋友们,请看入门指南。
几点应当注意的问题:
对于WCF服务,非常不幸的是当前版本的Silverlight还不支持配置文章。所以你必须用代码来绑定终结点地址(EndpointAddress),请参考入门指南。

对于WCF服务,当前只有BasicHttpBinding协议被支持。
对于跨域的情况,你必须在服务器上建立一个策略文件,参考http://msdn2.microsoft.com/en-us/library/cc197955(VS.95).aspx for more information.




对于在Web Services中遇到问题的朋友们,请看入门指南。
几点应当注意的问题:
对于WCF服务,非常不幸的是当前版本的Silverlight还不支持配置文章。所以你必须用代码来绑定终结点地址(EndpointAddress),请参考入门指南。

对于WCF服务,当前只有BasicHttpBinding协议被支持。
对于跨域的情况,你必须在服务器上建立一个策略文件,参考http://msdn2.microsoft.com/en-us/library/cc197955(VS.95).aspx for more information.

==================================
这个应当是可以的吧,我没有试。





分享到:
评论

相关推荐

    解决SilverLight跨域访问问题

    解决SilverLight跨域访问问题

    Silverlight学习源代码

    多个Silverlight学习源代码:silverlight toolkit中的主题(theme)应用、SilverLight 桌面文件夹效果源码、Silverlight4.0 Demo 源码、Silverlight5 beta新特性源码、SilverlightDataGrid、SilverlightMVVM模式...

    silverlight通过wcf处理word问题

    关于在silverlight使用word的时候遇到的问题,例如无法读取等的解决方案

    Silverlight示例

    Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例Silverlight示例

    Silverlight

    Microsoft Silverlight1.0

    silverlight5_sdk

    silverlight5_sdk 安装包

    Silverlight视频分享点播系统

    本次项目采用Silverlight实现一个简单的个人多媒体平台,通过该平台,用户可以搜索自己喜欢的多媒体文件,在线播放(其播放质量优于Flash);还可以参与评论、上传自己的作品。 技能点描述: 1.Silverlight常用控件...

    解决Silverlight跨域访问问题

    解决Silverlight以TCP方式访问自托管WCF服务时遇到的“跨域访问”问题。

    Silverlight 2 Toolkit July 2009

    Microsoft Silverlight 是一个跨浏览器、跨平台的 .NET Framework 实现,用于获得 Web 的媒体体验和丰富交互式应用程序。以下各节说明如何使用 Silverlight 生成应用程序: Silverlight 的 .NET Framework 类库 ...

    silverlight

    一步一步学silverlight 2系列

    我的silverlight学习

    我的silverlight学习我的silverlight学习我的silverlight学习我的silverlight学习

    SilverLight 网站发布遇到的问题总结与归纳

    关于Silverlight 的发布IIS中遇到的问题总结与归纳,解决访问数据库的错误与局域网中客户端访问不到的问题

    silverlight翻页

    silverlight翻页silverlight翻页silverlight翻页silverlight翻页silverlight翻页

    Silverlight揭秘.pdf

    《Silverlight揭秘》涵盖了Silverlight XAML 的方方面面,深入探讨了Silverlight 的特性,如图形、文字、音频、视频、动画和事件等,也讲述了如何使用构建块创建可重用的控件,执行普通的任务(如拖放),并解释了如何...

    silverlight SDK 4.0.50303

    silverlight SDK 4.0.50303 在VS2010中需要配套相同版本的silverlight 4.0.50303才能使用。

    silverlight视频聊天Demo

    silverlight视频 sl视频聊天 视频聊天 采集自银光论坛中的资源,一个蛮不错的视频聊天Demo,方便初学者作参考用``

    解决silverlight无法卸载的方法

     再试试安装silverlight或升级 是否成功了 反正我是成功了 祝你也好运  情况二及解决方法:  如果在使用windows update更新时 发现某个更新总是安装失败 并且错误代码是643 那么通常都是由于该更新所对应的...

    HTML 5 or Silverlight?

    尽管微软对于Silverlight的战略已经转变,不再吹捧将Silverlight作为提供跨平台运行时的承载工具,但是微软在继续推动Silverlight成为Windows Phone以及一些媒体和业务线(line-of-business)应用程序的开发平台。...

Global site tag (gtag.js) - Google Analytics