wcf

How do I properly handle a faulted WCF connection?

In my client program, there is a WCF connection that is opened at startup and supposedly stays connected til shutdown. However, there is a chance that the server closes due to unforeseeable circumstances (imagine someone pulling the cable). Since the client uses a lot of contract methods in a lot of places, I don't want to add a try/cat...

Set IncludeExceptionDetailInFaults to true in code for WCF

How do I set IncludeExceptionDetailInFaults in code without using App.Config? ...

How many WCF connections can a single host handle?

I'll try to explain this with an example. I'm writing a chat application. There are users that can join chat rooms. A user has to log in before he can join any room. Currently, there is a single service. A user logs in using this service. Then, the user sends and receives messages for all joined rooms via this single service. channel.L...

NetDataContractSerialization throwing deserialization error

hi, I have methods which return interface and some methods which accepts interface as parameters. I am trying to use Net DataContractSerializer but I am getting following error... The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri....

WCF - "Encountered unexpected character 'c'."

Hello, I am trying to do something that I thought would be simple. I need to create a WCF service that I can post to via JQuery. I have an operation in my WCF service that is defined as follows: [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat=WebMessageFormat.Json, ResponseF...

Is WCF netMsmqBinding multithreaded?

We are using .net WCF with netMsmqBinding. Is the netMsmqBinding multi threaded? Is there a way to change the bindings to use single thread? ...

Is NServiceBus suitable for general as well specific client notifications

I am looking at various options for a WCF based publish subscribe framework. Say I have one WCF web service that will be the publisher and 1000 clients registered as subscriber. For some published messages all clients will be interested but at the same time I wish the ability to notify a single client with a specific message. On receivin...

Is it possible to store ObjectContext on the client when using WCF and Entity Framework?

Hello, I have a WCF service which performs CRUD operation on my data model: Add, Get, Update and Delete. And I'm using Entity Framework for my data model. On the other side there is a client application which calls methods of the WCF service. For example I have a Customer class: [DataContract] public class Customer { public Guid C...

From ASPX to WCF

I'm hoping someone can advise me on how to solve my networking scenario. Both the client and server are to be C# / .NET based. I basically want to invoke some kind of web service from my client in order to retrieve both binary data (e.g. files) and serialised objects and lists of objects (e.g. database query results). At the moment, I'...

Does this MSDN article violate MVVM?

This may be old news but back in March 2009, this article, “Model-View-ViewModel In Silverlight 2 Apps,” has a code sample that includes DataServiceEntityBase: // COPIED FROM SILVERLIGHTCONTRIB Project for simplicity /// <summary> /// Base class for DataService Data Contract classes to implement /// base functionality that is needed l...

How to use WIX to deploy and run WCF service

Hi I am trying to make an installer which deploys my wcf service, at the moment it is creating the virtual directory, but when I try connect my app to it, I get a CommunicationException was unhandled by user code The remote server returned an error: NotFound. I notice that if I create a virtual directory manually that it will ...

Weird - "The EntityReference object could not be serialized" when serializing from an ASP.NET Web Site, but works OK on an ASP.NET Web Application

I have an Entity Framework data model. Part of the model is a Customer entity. The web service provides a method to get a customer, and to receive an updated version of this customer to be persisted. To test this, I created a new ASP.NET web Application, (Solution > Add > New Project > ASP.NET Web Application), then added a reference ...

.net WCF : How TO debug a proxy class

Any Idea, debug a WCF proxy class. Actually I have created a Partial Class of a PROXY ... and I need To TEST & DEBUG IT. using TestDriven.Net but when I put a Break Point on my Partial Class , it's giving warning message like "DebuggerStepThroughAttribute" is My Code Only ...

WCF for a shared data access

Hi all, I have a little experience with WCF and would like to get your opinion/suggestion on how the following problem can be solved: A web service needs to be accessible from multiple clients simultaneously and service needs to return a result from a shared data set. The concrete project I'm working on has to store a list of IP addres...

WCF reuse types in referenced assemblies does not reuse the ServiceContract Interface

I have four seperate projects: -MyUserControl (Needs a reference to a service implementing IMyService) -MyService (Implements IMyService) -MySharedInterfaces (IMyUserControl and IMyService) -MyWebApp The user control needs to be dynamically loaded at runtime. This implements IMyUserControl and has a property of type IMyService which...

IDispatchMessageInspector::AfterReceiveRequest Name of call service.

I implemented IDispatchMessageInspector and in method AfterReceiveRequest I can receive name of method (action) that calling from client like this request.Headers.Action. Can I found name of service that where this method was implemented? For example I have service Test and two methods Start and Stop and request.Headers.Action for this m...

wsFederationHttpBinding over net.tcp

I have services that use net.tcp bindings (both streaming and buffered endpoints.) I'd like to add WIF federated security to those services, while continuing to use net.tcp bindings. I've tried to create custom bindings, but so far have been unsuccessful. Below is the general architecture that I'm attempting. I'm looking for the correct ...

client side AJAX 4 Data binding Syntax for child tables in Linq2SQL returned from WCF, help !

hi, i am really lost at this, i am able to get the jason result and here is it from firebug console {"d":[{"__type":"Table1:#","id":1,"name":"asd","Table2s":[{"__type":"Table2:#","id":2,"family":"dfdfd","fid":1}]},{"__type":"Table1:#","id":2,"name":"wewe","Table2s":[{"__type":"Table2:#","id":1,"family":"fff","fid":2}]}]} now my quest...

How do I debug a Silverlight application against a deployed service [cross domain problem]?

I have a WCF service and a Silverlight application that work just fine when they're deployed to the IIS server. I want to debug the Silverlight application in Visual Studio on a development machine, but have it talk to the actual service deployed on the server, not to a local instance of it on the development machine. I was expecting t...

WCF DataContract with readonly properties

Hi, I'm trying to return a complex type from a service method in WCF. I'm using C# and .NET 4. This complex type is meant to be invariant (the same way .net strings are). Furthermore, the service only returns it and never recieves it as an argument. If I try to define only getters on properties I get a run time error. I guess this is b...