wcf-binding

Streaming with WCF and MTOM

人走茶凉 提交于 2019-11-30 09:42:08
I am using WCF bindings with streamed transfer mode, for both uploading and downloading binary content to/from a service. I've managed to get it working. I'll include the configuration, contracts, etc for reference. I've made some tests to benchmark different bindings and encodings. Uploading results seems ok. NetTcp being the fastest, followed by BasicHttp-MTOM and then BasicHttp-Text. What suprises me is that, when downloading large files, MTOM is very slow as opposed to Text encoding with BasicHttp and Binary encoding with NetTcp. Am I missing something? Why BasicHttp-MTOM works way slower

WCF Binding Performance

做~自己de王妃 提交于 2019-11-30 08:36:13
I am using basic HTTP binding. Does anybody know which is the best binding in terms of performance as thats the key issue for our site? Depends on where the services are located. If they're on the same machine, NetNamedPipeBinding should give you the maximum performance. Otherwise you'll have to choose depending on where they are located, if they have to communicate over the internet, interopability etc. Soledad Pano's blog has a good flow chart to help with choosing the appropriate bindings depending on situation This is comparing apples to oranges. If you are using the basic HTTP binding,

WCF Service Library with NetTcpBinding

依然范特西╮ 提交于 2019-11-30 08:35:48
问题 I'm having a tough time with NetTcpBinding. When I run my WCFservice,I get this: System.InvalidOperationException: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]. at System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host,

Expose webHttpBinding endpoint in a WCF service

六眼飞鱼酱① 提交于 2019-11-30 08:19:47
问题 I created a WCF service and exposed three endpoints which are basicHttpBinding, wsHttpBinding and webHttpBinding. This is a test service for my experiments with WCF. But, whenever I add service reference using the .svc file, I only get two (basic and ws) endpoints. There doesn't seem to be a third (webHttpBidning) endpoint being exposed for some reason. To reproduce this issue, create a WCF application project, delete the Service1 service, add new item > WCF service named TestService, and

Dynamic endpoints in ServiceReferences.ClientConfig

…衆ロ難τιáo~ 提交于 2019-11-30 07:24:59
问题 When building an app, it is often deployed in different environments (test, dev, prod), and therefore the endpoint addresses are changing. As the ServiceReferences.ClientConfig is built as a part of Silverlight's .xap file, its hard to change the endpoints after building the solution, as often is done with web.config. I've searched quite a bit for it, but I cant figure out what is best practice here, so my question is: What is best practice when it comes to dynamic wcf endpoint address

Is it possible to make the WcfTestClient work for custom transport channels?

前提是你 提交于 2019-11-30 07:10:39
问题 Goal I would like to be able to both host and connect to a vanilla sockets server via WCF, within the hosting framework I am devising. I want to be able to use WCF to codify the transport and protocol communications that have to be manually managed by sockets programmers today. This would allow me the ultimate interoperability with Linux server daemons that expose nothing but traditional sockets and proprietary protocols. I am only interested in verifying that transport channel layer

What happens if I set HttpGetEnabled = false

坚强是说给别人听的谎言 提交于 2019-11-30 06:36:56
问题 I am confused with Metadata publish concept. If in a WCF Service config file I had written : <serviceMetadata httpGetEnabled="false"/> No matter it is true or false. When I tried to give service reference in a client application using "Add Service Reference..." and clicked on "Discover", I am able to retrieve Service Reference. But when removed the following two lines: - <endpoint address="mex" binding="mexBasicHttpBinding" contract="IMetadataExchange"/> <serviceMetadata httpGetEnabled="false

Convert wsHttpBinding to customBinding

China☆狼群 提交于 2019-11-30 05:52:08
How do I convert the following wsHttpBinding to a customBinding? I need to so this so I can increase the clock skew. This is for http. <wsHttpBinding> <binding name="wsHttpSecurityOptions" maxReceivedMessageSize="10485760" maxBufferPoolSize="524288"> <security mode="Message"> <message clientCredentialType="UserName" establishSecurityContext="true" negotiateServiceCredential="true"/> <transport clientCredentialType="Certificate" proxyCredentialType="None"/> </security> <readerQuotas maxStringContentLength="500000"/> </binding> </wsHttpBinding> My attempt (as follows) fails with the error

WCF: Net.TCP multiple bindings, same port, different IP Addresses

丶灬走出姿态 提交于 2019-11-30 05:14:18
I've run into a problem. I'm a little new at WCF so any help would be greatly appreaciated. Here's my code: public static void StartHosts() { try { // Create a new host ServiceHost host = new ServiceHost(typeof(ServerTasks)); List<IPAddress> ips = new List<IPAddress>(Dns.GetHostAddresses(Dns.GetHostName())); if (IPAddress.Loopback != null) ips.Add(IPAddress.Loopback); ips.RemoveAll(i => i.AddressFamily != AddressFamily.InterNetwork); foreach (var ip in ips) { string uri = string.Empty; // Formulate the uri for this host uri = string.Format( "net.tcp://{0}:{1}/ServerTasks", ip.ToString(),

Does WCF always use SOAP to send information over your binding?

扶醉桌前 提交于 2019-11-30 04:00:51
I understand you can choose from a range of bindings, such as TCP, HTTP, HTTPS etc. Am I correct in thinking it always uses SOAP to send data over this connection? I am watching a guide to WCF and it is talking about how exceptions are serialized into SOAP and sent to the client. I would have thought that not all bindings would use SOAP to send data, so I am a bit confused about how it works. Although I understand the fundamentals of WCF, how to set up services and use a proxy on the client, it doesn't seem to have explained exactly how the data is packaged up to send. Perhaps the answer is