wcf

WCF Message Level Security

Hi, Hope someone can help me on this matter. I'm looking for a way of enabling message level security on my WCF service other than using certificates. Problem is that the application is used on clients that connect via a VPN with multiple sites that each have their own domain controller and the domains does not trust each other. I'm tota...

How to return HttpContext.Current.Cache from WCF?

Hei, I have a WCF service hosted in IIS and want to return the data which is reside in the cache of IIS (HttpContext.Current.Cache) What is the most appropriate choice of type this service should return? Thanks ...

OperationFormatter encountered an invalid Message body

I'm creating a WCF Client to an External REST API, but are getting the following error: OperationFormatter encountered an invalid Message body The client hits the server correctly and does the 'Post' that I am requiring, but it is expecting a different response Element, basically appending 'Response' to the name of the OperationC...

WCF custom binding/extensions causes validation error in app.config

Hi all, I was curious if anyone knew how to fix this: When I add a bindingExtension or bindingElementExtension to my WCF config, Visual Studio throws a schema validation warning, because the name of the extension is not in the system.serviceModel schema: Warning 1 The element 'bindings' has invalid child element 'nmsBinding'. List of p...

Why does WCF return myObject[] instead of List<T> like I was expecting?

I am returning a List from my WCF method. In my client code, it's return type shows as MyObject[]. I have to either use MyObject[], or IList, or IEnumerable... WCFClient myClient = new WCFClient(); MyObject[] list = myClient.GetMyStuff(); or IList<MyObject> list = myClient.GetMyStuff(); or IEnumerable<MyObject> list = my...

OperationBehavior with respect to AutoDisposeParameters - how does WCF behave?

In the context of a WCF service (on the server side), what is the difference between this: [OperationBehavior()] public string TestOperation() { } and this: public string TestOperation() { } In other words, do the default values for each parameter in OperationBehavior already apply even when the attribute isn't put on the method ...

Why does my service reference only generate asynchronous methods?

I have a Service Reference (not a web reference) in VS2008 to a web service that I did not write. The reference works, but only asynchronous versions of each method are available for me to use. In the "Configure Service Reference" dialog, the "Generate asynchronous operations" is checked and grayed out. First of all, I thought checking...

Custom object returning as "empty" from WCF?

For what reason(s) should WCF return me a "empty" instantiated object when it was clearly populated on my WCF service return before it went over the wire? For instance a simple OperationContract method: response.Client = new Client(); response.Client.ID = 99; return response; returns an "empty" Client object (on the client receiving ...

Silverlight/WCF Problem, expecting application/soap+xml, received text/xml.

I have a Silverlight application in which I would like to call a WCF service. When calling the service I receive the following response from the server: 415 Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8 Has anyone experienced this proble...

What is the best way to keep cached data to be shared across diff WPF applications across same machine ?

As of now, I am thinking of keeping data in a DataSet in a WCF hosted service and other apps(on same box) can access the data via Named Pipes(exposed through WCF service). The apps then keep a copy of dataSet inside them so as to not re-fetch the data from the WCF unless it gets changed. Is there a better way to achieve this ? Some oth...

Using the CCR with ASynchronous WCF Service

I'm learning how to use the CCR (Concurrency and Coordination Runtime) in conjunction with a Asynchronous WCF Web Service. This is the Test WCF Service: public class Service : IService { private Accounts.Manager accountManager = new Accounts.Manager(); public IAsyncResult BeginGetAccount(int id, AsyncCallback ca...

WS Addressing

Hi All Please any one clarify me WS Addressing in WCF does support the multiple ReplyTo or not?. Thanks Sekar ...

Automatically resend a message in WCF

I am using WCF to talk to a Java web service. This web service has a method called Authenticate that returns a session ID. Every request to this web service must contain this session ID in the SOAP header. If one's session times out, invoking any method results in a SoapException being returned. I would like to: Intercept every call ma...

Can I host a WCF service from within COM+?

New to WCF, but familiar with COM+ - can I wrap a WCF service inside a COM+ application? I realize many people may ignore the question and question my motive (and that's fine), but I'd actually like to know if this is fundamentally possible as well. ...

Difference between event-based and callback/delegate-based asynchronous methods?

When using svcutil.exe, I noticed this switch, /tcv:Version35. The docs says this: Version35: Use /tcv:Version35 if you are generating code for clients that use .NET Framework 3.5. By using this value, the SvcUtil.exe tool generates code that references functionality in .NET Framework 3.5 and previous versions. When usin...

Can I force svcutil.exe to generate data contracts for a WCF service?

I would like to force svcutil to generate all data contracts in an assembly that is used by WCF, regardless of whether or not a type is referenced by a given operation contract. [DataContract] public class Foo { } [DataContract] public class Bar : Foo { } [ServiceContract] public interface IService { [OperationContract] void G...

How to set up a WCF client using wsDualHttpBinding in code?

I have a need to connect to a WCF service I wrote without having to deploy an app.config for the client application I'm writing. However, I've been having a very difficult time trying to figure out how to set up things from the client side in code. This is as far as I've gotten... does anyone have any ideas what I need to do to get this ...

Web services and interface compatibility

Adding a service reference to a web service (this is all WCF) in Visual Studio produces some generated code including a client-side restatement of the interface being exposed. I understand why this interface is generated: you might be consuming a 3rd party service and not have access to the actual interface. But I do, and the two are n...

How can I easily deploy a certificate with a host application ?

Hi, My use case is very simple : I have a GUI application, and inside this application I host a service however clients of this services must be able to authenticate with UserName safely (The only thing I want is to encrypt messages to be sure that nobody can sniff to retrieve password of clients, I don't care about more security). So,...

How to code hosting of the WF with WC 3.5 ReciveActivity in Windows Service (XP)?

I created a small VS solution that includes WF with WCF ReceiveActivity project (using basicHttpBinding) and a number of plain C# services. They all work perfectly when tested from VS 2008 using WCFTestClient. I deployed them into a single Windows Service. All but WF service work fine. I spent 6 hours browsing, but didn’t find a solu...