wcf

WCF: intercept message send/receive progress in client

Hello gurus, I have a desktop application sending/receiving messages (not files) to/from a WCF service. How do I intercept the total size of the message to be transferred and receive feedback (number of bytes transferred) during the transmission so a progress bar maybe displayed to the desktop app user? How many approaches are there...

When and where to set a custom IOperationInvoker?

I'm trying to extend WCF so that I can have a RESTful web service, in which, for each operation, I perform a verification of the HTTP Authorization header, whose value I use to call a Login() method. After the login is done, I wish to invoke the operation's corresponding method checking if a security exception is thrown, in which case...

service.close() vs. service.abort() - WCF example

In one of the WCF tutorials, I saw the followign sample code: Dim service as ...(a WCF service ) try .. service.close() catch ex as Exception() ... service.abort() end try Is this the correct way to ensure that resources (i.e. connections) are released even under error conditions? Thanks for the answers guys! I up...

Step by Step guide or demo to implement POCO(plain old CLR objects) in Silverlight and WCF?

Hello ALL, Looking for some step by step guide to implement Dataaccess layer, Biz layer and Presentation layer using Silverlight, WCF and SQL database,C#. I tried lots of examples and ebooks( SL 2.0 Recipes, Data Driven Service with SL etc), but I am unable to get the data shown on the Silverlight side. I am not a guru in OO but I can un...

WCF custom MessageEncoder requires custom Behavior

I have written a custom MessageEncoder for a WCF pipeline, which is then applied using a BindingElementExtensionElement within my app.config. On the server, when a message arrives, my message encoder needs to pull some information from the stream, and hold it for the duration of the Operation Context, so that it may be returned as a hea...

WCF object properties setting to NULL when returning from my service

Hi there, I have a WCF service that returns a complex object (just a class). I can step into the construction on the object and see that it's properties are being populated but when I hit the F11 key on the return statement of the method that populates the object and i'm on the next line back in the client all the objects properties are...

Can I invoke another application by specifying it in a config file?

Hi, suppose I have some asp.net and WCF web service applications, which are running perfectly in the server. Somehow I want to create another application A, for generic usage, I want to attach a copy of A to all those asp.net or WCF applications. But A does not have anything to do with those applications, A just collects some data, do...

Async call for WCF service hosted in windows service

I have hosted a WCF service in windows service. I have console app for which I added a WCF service reference and generated Client for it. I can make Sync call to the service,but Async call doesn't seem to work. If i attach server process it doesn't hit the service at all. client= new ServiceClient(); client.DoSomething();//Works fine ...

WPF Databinding problem of a WCF [MessageContract] class

Hi All, I've a class on the server [MessageContract] public class RemoteFileInfo : IDisposable, INotifyPropertyChanged { [MessageHeader(MustUnderstand = true)] public string _FileName; [MessageHeader(MustUnderstand = true)] public string FileName { get { return _FileName; } set { _FileName = val...

WCF service reference update

Hi, Right now we have around 5 service reference added to our projects in a single solution. I am force to add service reference even for projects having indirect dependencies calling service methods. Is there a way to get around for this situation. For every single change in the service method, I have to update every single service re...

DB_SEC_E_AUTH_FAILED error

I'm getting this error when accesssing a WCF service that accesses a .mdb file on disk. It's apparently not a permissions error. Do any of you have familiarity with this error and what might be the cause? ...

Hosting a WCF service to be consumed by multiple consumers, getting a FaultException.

I have one computer acting as a WCF service host. a client machine will have multiple client processes running, each also hosting WCF services on separate ports (5601, 5602, etc.). The client processes will handshake the host. Once the handshake is received, the host will send back some data. The client processes are spawned one after an...

Cannot complete a JSONP call from jQuery to WCF

Okay, I am trying (poorly) to successfully make a JSONP call from jQuery on a test page to a WCF web service running locally, as a cross-domain call. I have, at one point or another, either gotten a 1012 URI denied error, gotten a response but in Xml, or just had no response at all. Currently, the way I have it configured it spits back a...

MVVM, Prism and Service Discovery

Hi, I'm writing an application (Silverlight and WPF) using the MVVM pattern and the Prism framework. In my application I have a grid that contains a list of customers. Under that, I various views that present customer details. All of the information is fed from a WCF service that provides data from queries as well as callbacks which fir...

How can I create 'smarter' (ie typed checked/readonly properties) Client DataContract objects?

I'm quite stuck on one part of using WCF for a client/server messaging system, and would very much appreciate some help. On the server, I've got a Message DataContract object where one of the properties points to a typed collection of MessageBody DataContracts. A stripped down version of the class looks like this: [DataContract] class...

svcutil.exe redundant proxy classes

Hi All, I have a WCF service library containing two services. These two services share a common set of classes in their operations. When I generate the WCF proxies with svcutil.exe, I get two sets of proxy classes (one for each service). Is there any way to have it only generate one set of these shared classes? Or will I have to partit...

WCF : maxConcurrentCalls has exhausted

Hello, I'm in the process of troubleshooting a WCF Service that hangs at some point. The service behavior is the following: [ServiceBehavior( InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple )] Throttling parameters are : <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="50...

Passing Attributes on DataContracts in WCF

Hello, I have a a datacontract which has important attributes on. For example, in the following code: [DataMember] [Description("My Description")] public string Name { get; set; } I want the Description attribute to be auto generated on the client proxy. Is there any solution, or workarounds besides massive duplication? Many thanks...

Adding a custom wcf behavior extension causes a ConfigurationErrorsException

I want to add a behavior extension so that my service classes will be instantiated with Ninject. I created a class that inherits from BehaviorExtensionElement and registered it in my App.config. I cannot see anything obvious I'm missing, yet on startup this is thrown: System.Configuration.ConfigurationErrorsException: An error occurred ...

WCF timeout if I add 1 element to an array

Hi, I wrote a test WCF service that returns a string array as long as the parameter of the method. public class XNS_Test : IXNS_Test { public string[] testString(int num) { string[] s = new string[num]; for(int i = 0; i < num; i++) { s[i] = "abcde"; } return s; }} I wrote a Form App to see how much time it takes: privat...