在Silverlight中更改WCF端点

编程入门 行业动态 更新时间:2024-10-27 12:41:21
本文介绍了在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端点

本文发布于:2023-07-11 11:56:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1093966.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Silverlight   WCF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!