首页 文章
  • 1 votes
     answers
     views

    WCF和gSOAP - 可互操作的代码?

    我正在尝试使用SOAP 1.2协议编写一个简单的WCF服务器gSOAP客户端概念验证应用程序 . 这是服务器代码: [ServiceContract(Namespace="http://test.com")] public interface IService1 { [OperationContract] void HelloWorld(); } [Servi...
  • 1 votes
     answers
     views

    在WCF datacontract中公开扩展方法

    是否可以在WCF中作为数据协定的对象公开扩展方法? 这是一个例子: [DataContract] public class Customer { [DataMember] public int ID { get; set; } [DataMember] public string FirstName { get; set; } [DataMember] ...
  • 2 votes
     answers
     views

    如何在每个调用中使用动态用户值在WCF中添加cutom标头?

    我正在使用一个带有WCF客户端的java webservice . 我想将 Headers 中的用户相关信息传递给服务 . I have aleady gone to through thread How to add a custom header to every WCF calls? 我用 BeforeSendRequest ()方法实现了 IClientMessageInspector...
  • 0 votes
     answers
     views

    WCF属性在客户端上不可见

    我目前正在开发一个WCF服务.net 4.0,它有2个属性 . 出于某种原因,这些属性在客户端上不可见 . 以下是该服务的代码 . using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; usin...
  • 2 votes
     answers
     views

    指定要与WCF客户端一起使用的传出IP地址

    How to define the LocalEndPoint to use by a WCF client when calling a WCF service (if the client machine has multiple IP addresses) ? 我有一台位于DMZ中的机器有两个IP地址,外部IP地址可以通过防火墙通过我们位于外部服务提供商的网络服务器的VPN连接到达 . 在此...
  • 2 votes
     answers
     views

    使用行为动态更改WCF endpoints 地址

    我想根据客户端的应用程序配置文件中的自定义信息动态更改从我的客户端调用的WCF服务的地址 . 我的第一次尝试是创建 endpoints 行为,并实现 IEndpointBehavior.Validate 方法,实现如下所示: void IEndpointBehavior.Validate(ServiceEndpoint endpoint) { ... endpoint.Address = ...
  • -1 votes
     answers
     views

    WCF测试客户端在我的IP上工作,但不在其他IP上工作

    我已经创建了WCF测试客户端,它正在处理我的IP . 但是,当我试图在客人的IP上进行测试时,它无法正常工作 . 请参阅以下错误消息: 无法调用服务 . 可能的原因:服务离线或无法访问;客户端配置与代理不匹配;现有代理无效 . 有关更多详细信息,请参阅堆栈跟踪 . 您可以尝试通过启动新代理,还原到默认配置或刷新服务来进行恢复 . 有什么想法我收到这个错误?
  • 2 votes
     answers
     views

    WCF错误109:这是从管道读取错误 . 管道在客户端关闭

    我在我的客户端应用程序上收到以下错误 There was an error reading from the pipe: De pipe is beëindigd. (109,0x6d). 使用我的OperationContract的特定实现时 . 以下是一个切入点的示例 . 我的DataContracts如下: [DataContract] public class Person { ...
  • 4 votes
     answers
     views

    我们可以使用WCF服务上传500MB的文件大小吗?

    我写了一个WCF服务来上传文件 . 到目前为止,我能够上传300MB的文件大小 . 当我进一步尝试时,我收到错误提及 “基础连接已关闭:连接意外关闭 . ” 我在WCF服务以及客户端DLL [Uisng Channel工厂]中将缓冲区大小增加到2GB . 此外,我已将客户端的sendTimeout和Receive Timeout以及WCF服务增加到1小时 . 我还将httpruntime元素max...
  • 380 votes
     answers
     views

    WCF客户端“使用”块问题的最佳解决方法是什么?

    我喜欢在 using 块中实例化我的WCF服务客户端,因为它几乎是使用实现 IDisposable 的资源的标准方法: using (var client = new SomeWCFServiceClient()) { //Do something with the client } 但是,如this MSDN article中所述,将WCF客户端包装在 using 块中可能会掩盖导...
  • 4 votes
     answers
     views

    WCF,渠道工厂和例外

    使用vs2008,vb.net,C#,fw 3.5 我在我的客户端使用我的服务 服务托管在IIS中 客户端(winforms MDI)使用svcutil使用/ l,/ r,/ ct和/ n开关生成 服务和客户端都使用MyEntities.dll 我正在使用nettcp与TransportWithMessageCredential我在主窗体中缓存代理 if Membership.ValidateU...

热门问题