本文介绍了在Silverlight中更改WCF端点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在我的Silverlight应用程序中以编程方式更改WCF端点参数?
解决方案以编程方式获取端点地址的最佳方法是通过创建端点.将当前URL传递给端点构造函数: <br /> new Uri(Application.Current.Host.Source, "../MyService.svc");<br />
您的Web应用程序的根目录中存在"MyService.svc". 如果有帮助,请投票.
>>>错误:无法获得< asp:silverlight> default.aspx中的标记 这与WCF完全无关. asp:Silverlight控件已弃用. 使用HTML或JavaScript将Silverlight添加到网页 [ ^ ] 我的意思是服务.我尝试了所有在google中找到的方法.但是不起作用(((((
How do I change the WCF endpoint parameter programmatically in my silverlight app?
解决方案 Best way to get the endpoint address programmatically is to create the Service Client by creating the endpoint. Pass the current url to the endpoint constructor: <br /> new Uri(Application.Current.Host.Source, "../MyService.svc");<br />Provided "MyService.svc" is present in the root directory of your web application. Please vote for it if it helps you.
>>Error: can''t get <asp:silverlight> tag in default.aspx That has absolutely nothing to do with WCF. The asp:Silverlight control is deprecated. Adding Silverlight to a Web Page by Using HTML or JavaScript[^]I mean for a sevice. I tried all the way found in have googled. But don''t work(((更多推荐
在Silverlight中更改WCF端点
发布评论