wcf

WCF Discovery simply doesn't work

纵饮孤独 提交于 2020-01-30 16:51:51
问题 I'm trying to add ad-hoc discovery to a simple WCF service-client setup (currently implemented by self hosting in a console app). Debugging using VS2010 on windows 7, and doing whatever I can find in online tutorial, but still - the discovery client simply finds nothing. Needless to say if I open a client to the correct service endpoint I can access the service from the client. service code: using (var selfHost = new ServiceHost(typeof(Renderer))) { try { selfHost.Open(); ... selfHost.Close()

RestartManager causes worker role to restart

依然范特西╮ 提交于 2020-01-30 07:53:05
问题 lately we encountered the problem that our Azure Worker Role service restarts almost every day. This is a huge problem for us, since our service needs around 20 minutes to initialize and these restarts can cause downtimes. I logged in to the instances via RDP and looked in the event logs to figure out what was causing these seemingly random restarts. I came accross a few entries that always preceded a restart: The service installed by the MsiInstaller is "Windows Azure Remote Forwarder". I

WCF只能序列化基础的数据类型,不能直接序列化SqlParameter类型,需要使用自定义类

£可爱£侵袭症+ 提交于 2020-01-30 07:09:04
客户端调用WCF的时候报上面的错误,WCF只能序列化基础的数据类型,不能直接序列化SqlParameter类型,需要使用自定义类,然后在WCF服务端转换的方式解决: 自定义类代码如下: 1 using System; 2 using System.Collections.Generic; 3 using System.Data; 4 using System.Data.SqlClient; 5 using System.Linq; 6 using System.Runtime.Serialization; 7 using System.Text; 8 using System.Threading.Tasks; 9 10 namespace CommonLib.CustomClass 11 { 12 /// <summary> 13 /// 方法标记为DataContract约束,属性标记为DataMember 14 /// </summary> 15 [Serializable] 16 [DataContract] 17 public class SetSqlParameter 18 { 19 #region 属性 20 21 /// <summary> 22 /// 参数名称 23 /// </summary> 24 [DataMember] 25 private string

Information Reuse in WCF

ぃ、小莉子 提交于 2020-01-30 06:29:45
问题 While reading SOA articles I came across an article in http://www.ibm.com/developerworks/websphere/library/techarticles/0806_boughannam/0806_boughannam.html . This explains about a Semantic/Logical service. There is an example of "request for organization data coming from sales department". This approach helps in overcoming the silos concept. I was wondering whether there is any WCF implementation similar to the architecture mentioned in the article. Though I made some search, I could not

MessageSecurityException No signature message parts were specified for messages with the 'http://…' action

为君一笑 提交于 2020-01-30 05:26:48
问题 here is the config file used by both the client and the server <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IPM_Service" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8

化零为整WCF(19) - WCF 4.0 新特性

不羁的心 提交于 2020-01-29 20:50:43
[索引页] [源码下载] 化零为整WCF(19) - WCF 4.0 新特性 作者: webabcd 介绍 WCF(Windows Communication Foundation) - WCF 4.0 新特性 简化配置(Simplified configuration) - 根据 baseAddresses 生成默认 endpoint;在应用程序的级别上指定默认的 Binding 配置和 Behavior 配置 不需要 .svc 的物理文件,而直接在 IIS 上托管 WCF 服务 标准终结点(Standard Endpoint) - 内置了 8 个已经定义好相关配置的标准终结点(分别为 mexEndpoint, announcementEndpoint, discoveryEndpoint, udpAnnouncementEndpoint, udpDiscoveryEndpoint, workflowControlEndpoint, webHttpEndpoint, webScriptEndpoint) 通过标准终结点中的 webScriptEndpoint 来提供 ajax 服务 对 REST 服务支持的增强 对路由服务,工作流服务,字节流编码,非破坏性队列接收,服务发现的支持 示例 1、概述 Index.aspx 代码 <% @ Page Language = " C# "

Force WCF to use one thread

耗尽温柔 提交于 2020-01-29 18:38:26
问题 I have a console application which uses an external library. The library insists on always being called from the same thread; it locks up otherwise. (I did try running as STA to see if that would fix it - but no, it really insists you have to always use the same thread. My guess is thread-local storage...) Previously the application communicated using a raw TCP connection. However, I recently changed it to use WCF. Now it seems that WCF chooses threads at random to run my code, which results

【分享】通用强大的主数据管理系统(最终分享版本)架构分析及源码下载

这一生的挚爱 提交于 2020-01-28 02:19:24
  之前已发个文章分享刚完成的版本( http://www.cnblogs.com/kudy/archive/2011/11/07/2237802.html ),这个是最近对MSH重构后的调整版本,修正了之前存在的几个小bug,也是最后分享出来给大家学习的版本。特别说明: 源码分享出来主要不是让大家直接用,而是从中学习某方面值得你学习的,另一个目的是让大家对 MSH 进一步的了解,因为此系统使用了它提供数据访问。   主数据管理系统(Master Data Management System),本人开发它的目的是用来管理/整合公司内部所有子系统,包括用户、角色、权限(权限管理,授权与验权基础实现),同域名情况的单点登录,等等主要数据的管理。 点击下载最终分享版 ( VS2008/VS2010、.Net 3.5 ) 下载后必须要了解的: 一、数据库创建与初始化数据 在SQL server 2005/2008 下新建名为 Db_Mdms 的数据库, 然后 按顺序 执行目录 Documents\Mdms.Documents\DB 1.0\Scripts 里的sql 1_tables.sql 2_functions.sql 3_stored-procedures.sql 4_init_data.sql 二、修改数据库连接信息 在目录 build\Mdms.Msh 里修改 Mdms.MSH

How to fix MaxItemsInObjectGraph error?

送分小仙女□ 提交于 2020-01-27 23:39:47
问题 I have a RESTful WCF service and I am getting the following error: Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. I thought I had resolved this but apparently not. Here is my code: I use a .SVC file that uses a custom factory like this: <%@ ServiceHost Language="C#" Debug="true" Service="myService" Factory="myCustomWebServiceHostFactory" %> Here is the code for the custom

Web Service

非 Y 不嫁゛ 提交于 2020-01-27 11:05:36
WebService调试:修改后的文件,首先生成一下,否则调试时断点不能进入。 WebService发布后,服务是封装在一个wsdl(Web Service Description Language,Web服务描述语言)文件中,客户端发请求主要是向发布好的wsdl地址以SOAP方式发请求,调用过程如下: 1.服务端生成服务描述文件,以供客户端获取。 2.客户端取得服务端的服务描述文件,解析该文件从而获得服务端的服务信息以及调用方式。 3.客户端指定调用方法和参数,生成恰当的SOAP请求消息,发往服务端,并等待服务端返回的SOAP回应消息。 4.服务端接收客户端发来的SOAP请求消息,解析其中的方法调用和参数格式。并根据wsdl的描述,完成指定功能,将返回值放入SOAP回应消息返回给用户。 5.客户端解析得到的返回值。 WebService的三要素是: SOAP (Simple Object Access Protocol):简易对象访问协议,soap用来描述传递信息的格式。 WSDL (WebServices Description Language):Web服务描述语言,用来描述如何访问具体的接口。 UDDI (Universal Description Discovery and Integration):通用描述、发现及整合,用来管理、分发、查询WebService。