wcf

Share ASP.NET session state between two WCF different services

I have two WCF services configured with ASP.NET compatible mode to allow them to use ASP.NET session state. The problem is as follows: 1.- A call to the first service stores a value in the ASP.NET session state. 2.- A second call to the first service can read that value. but... 3.- A call to the second service can't read the ASP.NET s...

Using Durable Services for saving wcf instances

I am currently creating a service which connects to a DAL and that can run a few stored procedures, one of the issues I am facing is that for certain times of the month, we can't update the database, (at the moment this is done manually. This is done via the user adding a note to their calendar) But I would like to automate this process...

WCF Error - The operation has timed out

We have created a WCF service hosted in a windows service that handles Authentication requests. The only behavior is : ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; selfHost.Description.Behaviors.Add(smb); Our clients are able to authenticate succesfully 10 times then we get the error T...

WCF Service Throttling

Dear All I have a WCF Service Deployed in a Console App with BasicHTTPBinding and SSL enabled on port using NetSH command and more over following attribute is set as well. [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] And also i have set the Throttling behavior as <serviceThrottl...

Connection aborted.

I am getting this error when i am trying to upload a file of 3mb or more on my WCF client application. SocketException (0x2745): An established connection was aborted by the software in your host machine] System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73 System.Net.Sockets....

How do I pass values to the constructor on my wcf service?

I wish to pass values into the constructor on the class that implements my service. However ServiceHost only lets me pass in the name of the type to create, not what arguments to pass to it’s contractor. I would live to be able to pass in a “factor” that creates my service object. What I have found so far: WCF Dependency Injection...

Is NetNamedPipeBinding binding guaranteed to work only on the same machine?

Hi, I've created a Windows Service that uses WCF for communications to it. The service should be used be called only from the same machine. If I can guarantee that there's no way to communicate with it from another machine, I can consider it secured. Since I'm using communications on a single machine, I opted to used NetNamedPipeBindi...

WCF: WSDL-first approach: Problems with generating fault types

Hi, I'm currently in the process of creating a WCF webservice which should be compatible with WS-I Basic Profile 1.1. I'm using a wsdl-first approach (actually for the first time), defining first the xsd for the complex types, the WSDL and then using svcutil.exe for generating the according server as well as client-side interfaces/proxi...

What is the difference in WCF when using KnownType and ServiceKnownType?

I have a service that returns an array of animal but the list can contain cats, dogs, etc, which all extend animal. I know I need to use either the KnownType or ServiceKnownType attribute, and on the entity class or the service class, respectively. What is the difference between the 2 attributes? I prefer the ServiceKnownType because it...

wcf net.tcp using SSL

Has anyone had experience using SSL with net.tcp binding in WCF? Ive read its possible, but not finding good information on how to implement it. I would love to hear from anyone who knows about or who has implemented this. Thanks in advance... ...

What is WCF (and pros and cons)?

I am trying to understand what is WCF, but can't get a visual understanding of how it adds value (reading msdn does'nt help). I have worked with COM in the past, and I know about webservices. Can someone shed some light on what is WCF and its pros and cons (maybe how it relates to COM or replaces COM etc)? If I can visualize the archite...

WCF without NET 3.0

Hello there, Does anyone tell me if it's possible to use WCF without .NET 3.0? Our company develops a 3-tier client-server end-user solution based on .Remoting. One of the limitation of our project is using .NET 2.0. Unfortunately .NET 3.0 framework is too large to be included in our installation package and I don't know if MS license ...

WCF , The remote server returned an error: (400) Bad Request.

I am getting this exception when trying to access a wcf web service. [WebException: The remote server returned an error: (400) Bad Request.] System.Net.HttpWebRequest.GetResponse() +5314029 System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +54 Server Binding Information <system.serviceModel> <bindi...

How do I use WS-Security with WCF?

Below is the style of header I need to create. I am expected to use either a public/private key or a SSL style certificate. I don't know for certain, but I think my counter-party is using some form of Java. <soap-env:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"&gt; <ds:Signature xmlns:ds="ht...

How to set the MaxReceivedMessageSize programatically when using a WCF Client?

I want to set the MaxReceivedMessageSize property to some higher limit (Due to (400) Bad Request error) in my client programatically. This is the code I am using... WCFServiceTestClient wcfClient = new WCFServiceTestClient(new wsHttpBinding(), strServiceURL); My service url is dynamic and hence cannot use the web.config. //The f...

WCF code generation for large/complex schema (HR-XML/OAGIS) - is there an alternative?

Hello, and thank you for reading. I am implementing a WCF Service based on a predefined specification (HR-XML 3.0). As such, I am starting with the schema, and working my way back to code. There are a number of large Schema documents (which import yet more Schema documents) related to my implementation, provided by this specification. ...

Creating a simple wcf service publishing it to my webhotel, and get it to work

Hi, This seems to be a recurring problem to me. I want to get started doing wcf services. I create a new Wcf Service Library, compile it, and publish it using FTP to my providers webhotel. But its not working. I somehow cant get access. I dont want some fancy security model - i just want to get a hole through to my simple webservice. See...

What problems can occur with WCF BasicHttpBinding using a 3G network?

I have a Silverlight application communicating with a server over WCF using basicHttpBinding. It works fine over the web, but customers complain of "communications issues" over a 3G network. Is there anything specific in WCF that can be tweaked to work more nicely over a 3G network? What is it about a 3G network that might cause problem...

WCF/C# Unable to catch EndpointNotFoundException

Hi all, I have created a WCF service and client and all works until it come to catching errors. Specifically I am try to catch the EndpointNotFoundException for when the server happens not to be there for whatever reason, I have tried performing a simple try catch block catching the specific error and the communication exception it der...

Why do WCF clients depend on the app.config file?

Like a lot of things, I'm sure there's a good reason for this, so please help me understand... Why, by default, do WCF services store settings in app.config? This has been so frustrating trying to work with multiple Silverlight class libraries. These class libraries are supposed to be completely independent from each other, and this de...