wcf-binding

WCF Binding Performance

不羁岁月 提交于 2019-11-29 12:03:56
问题 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? 回答1: 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

Maximum request length exceeded in WCF

▼魔方 西西 提交于 2019-11-29 11:39:49
I am currently using Wcf application and getting above mentiooned error in Trace Log. Below is the Web.Config for Wcf Service. <bindings> <wsHttpBinding> <binding name="NewBinding0" closeTimeout="00:50:00" openTimeout="00:50:00" sendTimeout="00:50:00" receiveTimeout="00:50:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession enabled="true" /> <security mode="None"> <transport

How to transfer large amount of data using WCF?

霸气de小男生 提交于 2019-11-29 11:09:18
We are currently trying to move large amounts of data to a Silverlight 3 client using WCF with PollingDuplex. I have read about the MultiplerMessagesPerPoll in Silverlight 4 and it appears to be quite a bit faster. Are there any examples out there for me to reference (using MultipleMessagesPerPoll)? Or maybe some good references on using Net.TCP? Maybe I should be taking a completely different approach? Any ideas or suggestions would be greatly appreciated. Thanks! KodeKreachor Streaming serialized response chunks works well: Your WCF binding configuration would resemble the following:

(413) Request Entity Too Large

折月煮酒 提交于 2019-11-29 10:33:55
I have WCF service, and I have a method when I want to pass parameter as big string (over 1mb) I run this wcf and in WCF Test Client I changed configuration as is shown below: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IMyService" sendTimeout="00:05:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> <

WCF http binding

拈花ヽ惹草 提交于 2019-11-29 08:42:58
I create a wcf service application and a asp.net mvc project(as client). I added my wcf service via Add Service Reference file to my asp.net mvc reference. I use Entity Framework to connect DB in my wcf application. I have a UserManagement.svc.cs service. This is my UserManagement.svc.cs codes: public class UserManagement : IUserManagement { iFlowEntities db = new iFlowEntities(); public void AddRole(role role) { db.roles.Add(role); db.SaveChanges(); } public List<role> RoleList() { List<role> roles; roles = db.roles.ToList(); return roles; } } And I use this service in my UserController in

Expose webHttpBinding endpoint in a WCF service

拈花ヽ惹草 提交于 2019-11-29 06:28:01
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 change the config file to the following : <system.serviceModel> <services> <service name="WcfTestService

Convert wsHttpBinding to customBinding

跟風遠走 提交于 2019-11-29 03:53:06
问题 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

Dynamic endpoints in ServiceReferences.ClientConfig

China☆狼群 提交于 2019-11-29 03:18:41
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 configuration in silverlight? To clarify, depending on which server the app is on (test,dev, prod) the

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

半世苍凉 提交于 2019-11-29 03:07:28
问题 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; //

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

我的未来我决定 提交于 2019-11-29 01:32:44
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 generically using WcfTestClient at this point. My understanding is that the WcfTestClient does not support