wcf

HttpRequest.ServerVariables throws ArgumentException in WCF with IIS7

We have a WCF (.NET 3.5 SP1) service running in IIS7, which is marked to allow ASP.NET compatibility mode so we can access HttpContext.Current: [AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] However, when trying to access any server variable it throws an ArgumentException: Syste...

RESTful WCF service returns "endpoint not found" error on POST operations

I've built a WCF service that's exposed both through SOAP and RESTfully. All SOAP actions work as advertised. GETS/PUTS do as well, but when I try to do a POST to an action in my service, I get the following error returned: "Endpoint not found" IPersonEditServiceContract snippet: [OperationContract] [WebInvoke(Method="POST", Uri...

Reporting a WCF application's status to F5's Big IP products

In a Windows Server 2003 environment with a self hosted .Net 3.5/WCF application, how can an application report its status to a BigIP Local Traffic Manager? Example: One of my services errors. My custom WCF application hosting software (written because Windows Server 2008 is not yet available and I'm using WCF TCP bindings) detects thi...

WCF FaultContract and where to put Fault Class (creating Multiple Services that use one FaultContract)

I am fairly new to WCF and have created a few services, so I have some experience with WCF. I want to create multiple services that can use a single FaultContract. I have noticed that the Fault type needs to be in the same project to make use of the [DataContract] and member attributes. Is this true or is there something I can do to add ...

Is there a WCF Rest C# Client Generation Tool?

Before I venture down the path of creating one, I was wondering if anyone knows of a utility program which will take the REST Help page of a WCF Rest Service and create the relevant Client for C# consumption. Similar to what svcutil.exe does for WCF Services or what wsdl.exe did for web services but for WCF REST Services Kind Regards...

WCF - client proxy config does NOT match service web.config

I have a simple WCF Service that needs to handle large datastreams, so I have the a lot of the config values bumped up above the defaults. I've recently been moving all of my code into a new, restructured solution, and I just moved over the service. However, when I try to generate a client proxy (using either WCFTestClient.exe or "Add ...

WCF Web Service Testing with QTP

I want to automate testing of WCF Web Services(over TCP) using QTP's WebServices Add-In. However when I specify path of WSDL it gives me errors. Has anyone tried using QTP? or any other tool that I can use for testing? ...

How should the Request Body look like?

I have a WCF service with a method which looks like this (returns null for testing with the debugger, I care only about getting data in for now): [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "fares", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedReq...

c# wcf - exception thrown when calling open() on proxy class

hi all! I have the following problem, basically i have a WCF service which operates fine in small tests. However when i attempt a batch/load test i get an InvalidOperationException with the message when the open() method is called on the proxy class: "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be m...

How do I configure a WCF client that expects a plain text response?

I am trying to create a wcf client for tinyUrl. However, the tinyUrl API returns a plain text response and the WCF webHttpBinding doesn't seem to understand it. Is there anyway to tell WCF I am expecting a plain text response from the server? ...

WCF Service invoking - without any reference added

I want to invoke a wcf service for testing on the http layer. I do not want to add a service reference and create a proxy and invoke. I want to create a new web test(VSTS) which sends a http request to the service and posts(Http post) the request in http body as an xml. I have service metadata, with which I can see the datacontracts, bu...

Adding comments to a WSDL output from WCF/.Net

Hi Guys, based on the WSDL spec from W3 there is the possibility to add "wsdl:document" tags to the WSDL output so that people using that webservice have a better explanation/documentation about this webservice. Does anybody know how to make WCF use these comments/descriptions, or how to write the code in C# that those comments are exp...

Multiple Languages for WCF Web Services. What are the best practices?

I'm developing a web service that needs to return results in both french and english. (Other languages may be added later.) The web service is written in C#. I have separated all of the strings into a resource file. I was planning on adding a parameter to the service and setting the Thread.CurrentThread.CurrentCulture to the appropriate...

JQuery/WCF without ASP.NET AJAX:

Hi, I am proper struggling getting that "magic" moment when WCF is configured nicely and jQuery is structuring its requests/understanding responses nicely. I have a service: <%@ ServiceHost Language="C#" Debug="true" Service="xxx.yyy.WCF.Data.ClientBroker" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %> Thi...

WCF System.ServiceModel.Channel.Message: binary message contents (non-XML)?

I need to retrieve binary (non-XML) documents as Messages in a custom WCF LOB Adapter (for consumption by BizTalk). The messages need to be represented as instances of System.ServiceModel.Channel.Message. I can't find how to create an instance of this class when the content is binary (by "binary" I mean any arbitrary byte array or Strea...

Serialize Entity Framework objects into JSON

It seems that serializing Entity Framework objects into JSON is not possible using either WCF's native DataContractJsonSerializer or ASP.NET's native JavaScript Jersializer. This is due to the reference counting issues both serializers reject. I have also tried JSON.Net, which also fails specifically on a Reference Counting issue. My ob...

Can WebInvoke attributes be replaced by binding configurations

In order to get a WCF service working with JQuery I have added a WebInvoke attribute on the operation contract to control the JSON serialisation as follows: [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] Is there a way to control this serialisation via the service bindings in ...

WCF Serialization with object inheritance?

I have two objects, one is in our enterprise level and another in in our service level. The service object is inheriting from the enterprise. Here is a quick example: [DataContract] public class EnterpriseObject{ [DataMember] int ID{get; set;} string InternalUse{get; set;} } [DataContract] public class ServiceObject: En...

What type of performance should I expect out of web services?

What type of performance should I expect out of web services? I have an application that is averaging between 2 an 7 call per second on a simple GetServerTime() method. This method only returns a date from the server. I am using WCF and making the call over SSL. I know this question is really relative but I am just looking for some ball...

WCF for MetaWeblog

I'm trying to find a really good example for implementing the MetaWeblog API using a WCF service. I can't seem to clear my head and think of a clean way to do this. Any help is appreciated. ...