wcf

How to force requests to be JSON? I.e. how to block XML body?

I have a REST WCF service and a WCF client application for it. My operation has the WebGet attribute with the following properties: BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json However, when I use the WCF client, the request is made with the body in XML format! This...

Can I use WCF duplex binding to relay message?

I have a Client Application, a server and another client, lets call it third party. I have a callback interface as part of my contract that is implemented both by the third party and the client. The third party will call a server operation(method) then the server will trigger a callback but instead of calling the callback of the third ...

WCF and IIS 6 - WSDL is not exposed

Hello, I have developed an ASP.NET application that includes a WCF service. This service needs to be consumed by third party applications. This service has worked fine while testing in my development environment. My development environment is using IIS 7.0 on Window 7 RC 1. However, I cannot use the service once it is in my staging / pr...

Wcf and soapHeaders

In the past I've used a soapheader in order to send in a userId to a webservice, but in WCF I cannot see how to do this. Any ideas? ...

WCF Message Inspectors

I an developing a WCF service where I need to intercept incoming messages for custom validations. After my research, I found that I need to implement IDispatchMessageInspector for this purpose. So, I inserted my custom validations inside AfterReceiveRequest method of the interface. The problem: When I debug the code, I saw that message ...

To poll or not to poll (in a web services context)

We can use polling to find out about updates from some source, for example, clients connected to a webserver. WCF provides a nifty feature in the way of Duplex contracts, in which, I can maintain a connection to a client, and make invocations on that connection at will. Some peeps in the office were discussing the merits of both solutio...

Need Help With AJAX-Enabled WCF Services (Please Look @ System.ServiceModel in Web.Config)

Hi. I have been having some problems with this for a few days now... I have designed a WCF Class Library - WebAPILibrary. It is under my solution which also contains my web project. I now am attempting to enable a AJAX/JSON response to a search query. In the client code examples, I see something to the effect: function btnsrch_o...

Strongly typed ASMX versus WCF

I need some direction related to this topic; maybe I am missing the obvious. I dont see a contrast between WCF bound to HTTP and strongly typed web service. Why would this be any different?? I agree there are some development nuances especially related to XmlSerializer in ASMX vs WCF and a plethora of Microsoft jargons. Short of these;...

How do I add IOperationInvoker to wcf client

I want to add my own IOperationInvoker to a wcf client but can't get it to work. I have this class ClientProgram { static void Main() { CreateClient().SomeMethod(); } private static MyServiceClient CreateClient() { var client = new MyServiceClient(new NetTcpBinding(), new EndpointAddress"net.tcp://localhos...

how to use ASP.NET session in WCF?

how can I use ASP.NET session in WCF? or is there any alternative way to use "ASP.NET Session" like structure in WCF such as data storage? ...

Web Services on UDP

I need to convert an existing Web Service (done on .Net 2.0) which runs on SOAP/HTTP to run on UDP. I found a ton of resources on web on explaining why and how I should go about doing it. But all of them too general. Can someone point me to a example/resource of some sort specific to .Net? ...

WCF Web Service operation throws exception when passed more than 50kb byte[]

I have a WCF Service operation which takes an object as a parameter. This object has a byte[] property among others. A Client program calls this service operation using a svcutil generated proxy. when client program populates the object's bype[] propery with size more than 50Kb it throws following error. (while an image size smaller th...

dns tag is web.config WCF

What is the significance of this tag in the WCF client config? What does it actually mean. I have seen people put the name of their certificates in this tag like <dns value="CertificateName"> Can any WCF experts out there give me a detailed explanation... ...

No intropage in a Managed Windows Service

I have to do some maintenance on a WCF service that is hosted in a managed windows service. In the old deployed version I can enter: http://localhost:9091. It shows a page with info about the hosted WCF service (with a C# and VB example). When I get the sources from TFS and reinstall with the MSI, the same http://localhost:9091 gives a...

Problems with WCF authenication

I have a very simple WCF service that I would like to expose publicly. I created the service and set it up over our server without much hassle. The problem is that we are able to use the service from within our private network, but when we attempt to use it from outside the network, the following error is throw: “The Security Support ...

WCF - have client check for service availability.

Hi, I have a client-server system, both sides written by me, and I would like to put the clients in an 'offline' state when the server disconnects/dies, and then automatically bring them back 'online' when the server is available again. For the first part, I listen for channel faulted events and handle that by setting the client to off...

WCF Security and what to use in this situation.....

I have a client/server application that has many client machines and one service on a server..... On the server side I will be using a Windows Service to host my WCF service. The service will be passing data across the internet to the client machines. I figure I will be using wsHttpBinding with message level security, which requires a...

WCF Proxy and userPrincipalName

We have a rather large application my team and I are developing that contains a number of WCF NetTCP-based services. The Windows service this system will be running under won't be a local account, but instead a standard domain user (with admin privileges on the servers hosting the service). In the middle of testing connectivity I ran int...

Is it possible to use netTcpBinding with the VS 2008 development server?

Is it possible to have a WCF service configuration like this: <service behaviorConfiguration="WcfService1.Service1Behavior" name="WcfService1.Service1"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="" contract="WcfService1.IService1"> </endpoint> <endpoint address="mex" binding="mexTcpBinding...

WCF service with XML based storage. Concurrency issues?

I programmed a simple WCF service that stores messages sent by users and sends these messages to the intended user when asked for. For now, the persistence is implemented by creating username.xml files with the following structure: <messages recipient="username"> <message sender="otheruser"> ... </message </messages> It is po...