wcf-binding

Accessing PerSession service simultaneously in WCF using C#

前提是你 提交于 2019-11-28 09:03:48
问题 1.) I have a main method Processing, which takes string as an arguments and that string contains some x number of tasks. 2.) I have another method Status, which keeps track of first method by using two variables TotalTests and CurrentTest. which will be modified every time with in a loop in first method(Processing). 3.) When more than one client makes a call parallely to my web service to call the Processing method by passing a string, which has different tasks will take more time to process.

Callback with NetTCPBinding

家住魔仙堡 提交于 2019-11-28 08:56:23
问题 Is NetTCPBinding supporting Callbacks? If so, please redirect me to any appropriate example. Thanks 回答1: Look into using Duplex Messaging. NetTCPBinding supports it natively, unlike with HTTP, where you need a special binding (WSDualHttpBinding.) 来源: https://stackoverflow.com/questions/1212443/callback-with-nettcpbinding

Net TCP binding: The URI prefix is not recognized

送分小仙女□ 提交于 2019-11-28 07:43:13
问题 This really is bugging me for a couple of hours. I created the simplest WCF service using a TCP binding. namespace WcfTcpService { public class TestTcpService : ITestTcpService { public string Hello(string name) { return "Hello, " + name + "!"; } } } namespace WcfTcpService { [ServiceContract] public interface ITestTcpService { [OperationContract] string Hello(string name); } } Web.config file has the following section: <system.serviceModel> <services> <service name="WcfTcpService

Using netsh, bind an SSL certificate to a port number is failing

扶醉桌前 提交于 2019-11-28 07:13:25
I have followed the instructions in SSL with Self Hosted WCF Service . When I am trying to bind the certificate on Windows 7 using netsh as described in How to: Configure a Port with an SSL Certificate. , it is failing as follows. In Windows PowerShell PS C:\> netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF} Bad numeric constant: 224. At line:1 char:104 + netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={001 <<<< 12233-4455-6677-8899-AABBCCDDEEFF} +

WCF WebServiceHostFactory MaxReceivedMessageSize configuration

拥有回忆 提交于 2019-11-28 06:50:10
问题 I have a RESTful WCF web service called "Palladium" as a project in my VS2008 solution. It is hosted in an ASP.Net 3.5 Web Application using the WebServiceHostFactory implementation via a page called "Palladium.svc". My service works in a manner similar to the one explained here, whereby POSTs can be received by the service along with other parameters as defined in the URITemplate. The service works well, and I can receive posted information and work with it. My problem occurs when the post

Multiple stream in one stream will not passed to client properly

依然范特西╮ 提交于 2019-11-28 06:49:59
问题 In WCF service I fill Stream according to this question like : result.Stream = new MemoryStream(); BinaryWriter writer = new BinaryWriter(result.Stream); foreach (string fileN in zipFiles) { byte[] fileBytes = File.ReadAllBytes(fileN); writer.Write(BitConverter.GetBytes(fileBytes.Length), 0, 4); writer.Write(fileBytes, 0, fileBytes.Length); } writer.Flush(); return result; before this I was returning stream by this and everything works in service and client side: result.Stream = new

passing complex object to rest wcf

耗尽温柔 提交于 2019-11-28 06:05:00
问题 Passing custom object to REST WCF operation is giving me "bad request error". I have tried here with both uri path and query string type methods.Any help is greatly appreciated. service side code [ServiceContract] public interface IRestService { [OperationContract] [WebInvoke(UriTemplate = "getbook?tc={tc}",Method="POST",BodyStyle=WebMessageBodyStyle.Wrapped,RequestFormat=WebMessageFormat.Json)] string GetBook(myclass mc); } [DataContract] [KnownType(typeof(myclass))] public class myclass {

Hosting two WCF services using a single console app

孤人 提交于 2019-11-28 05:12:21
问题 I am trying to host two services using a single console app. However, when I am trying to do so, only one service gets hosted, while the other does not. Program.cs: namespace WWWCFHost { class Program { static void Main(string[] args) { using (ServiceHost host = new ServiceHost(typeof(WWWCF.Login))) { host.Open(); Console.WriteLine("Service1 Started"); } using (ServiceHost host1 = new ServiceHost(typeof(WWWCF.UserRegistration))) { host1.Open(); Console.WriteLine("Service2 Started"); Console

How to transfer large amount of data using WCF?

痞子三分冷 提交于 2019-11-28 04:43:22
问题 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! 回答1: Streaming serialized

(413) Request Entity Too Large

我们两清 提交于 2019-11-28 03:47:51
问题 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"