wcf

WCF writing directly to the response channel

Hi, is there a way to write ( a string for example ) directly to the output stream, when implementing a regular WCF interface like this: [ServiceContract] public interface ISearchInterface { [OperationContract] [FaultContract(typeof(Exception))] SearchResponse SearchXML(SearchRequest req); } I want to save de/serializatio...

Properly dispose ChannelFactory & Channel in Silverlight

I'm trying to avoid "Add service reference" in my SL app because I want to use the EntityFrameWorks new self tracking entities. So I'm trying out ChannelFactory to create a channel and call my interface methods asyncronously from that. It works, however I'm concerned about correctly closing/disposing ChannelFactory & the Channel. Is the...

Editing ObservableCollection's SelectedItem Without Bound Controls Seeing Edits Until They Are Saved

I have a view containing a ListView and an "Edit" Button. The ListView's ItemSource is bound to an ObservableCollection<Account> property on the underlying view model. Its SelectedItem property is also bound to the view model. When the edit button is clicked, the existing view model launches an editing view/view model pair ("editing s...

How to apply two Endpoint Behaviors to one behavior configuration?

This question is a follow up to @joshperry's answer on CustomQueryStringConverter. I implemented this solution with a small modification. My version converts System.Int32[] instead of string[]. However, I have a problem with my WCF configuration. My service dishes out SOAP, XML and JSON. SOAP wasn't a problem, this solution works fo...

WCF polling, background processing, and resource starvation

I have a web service, implemented with WCF and hosted in IIS7, with a submit-poll communication pattern. An initial request is made, which returns quickly and kicks off a background process. The client polls for the status of the background process. This interface is set and can't be changed (it's a simulation of an external service we d...

What is a WCF endpoint?

What is a WCF endpoint? How do you configure them? When would you want to change their configuration? ...

What is "mexHttpBinding"?

What is "mexHttpBinding" in WCF? When should this binding be used in preference to other bindings? ...

basicHttpBinding vs wsHttpBinding

In a WCF endpoint, what is the difference between basicHttpBinding and wsHttpBinding? When should each be used? ...

What can I put in a .SVC file for IIS?

I'm trying to find a definition of the directives that can be put into the file, but can't find any particular reference? I know of http://msdn.microsoft.com/en-us/library/aa967389.aspx which specified @ServiceHost but you can also use @Assembly etc... But I can't find a definitive reference of what .svc is and what you can put in ...

WCF ChannelFactory caching

I've just read this great article on WCF ChannelFactory caching by Wenlong Dong. My question is simply how can you actually prove that the ChannelFactory is in fact being cached between calls? I've followed the rules regarding the ClientBase’s constructors. We are using the following overloaded constructor on our object that inherits ...

ServiceContract class for an ASP.NET web service

I want to invoke a web service in my C# client application. I want to be able to bind to this web service dynamically. I am using the following code for dynamically calling a web service: class Program { interface IInterface static void Main(string[] args) { BasicHttpBinding bin = new BasicHttpBinding(); E...

How to protect a WCF service method with specific windows identity

I have a WCFservice named IEnvironmentService. This service provides some unsecure methods. I have to protect some methods in this service. In order to protect this methods I want to use windows identity. So other than the specific windows identity service methods cannot be callable. How can I achieve this. thanks. ...

What is the lowest interception point in the WCF runtime stack?

Dear ladies and sirs. I wish to debug why my application sends so much data using WCF underneath. I tried to examine WCF trace logs and examine the traffic with Fiddler, but I need a stack trace leading to the offending client code. So, I installed a custom IClientMessageInspector, but how can I know the size of the actual data given a...

Question on how to create WCF silverlight 3 endpoints.

I wanted to consume a WCF service with a silverlight application and a asp.net mvc application, and I'm having difficulties to configure the service to support both requests. these are my endpoints for the WCF config file. <service behaviorConfiguration="behaviorAction" name="Uniarchitecture.ProdutoService.ServiceImplementations.Prod...

Is it possible to instruct WCF not to serialize fields, which values are the default for the field type?

Dear ladies and sirs. Inspecting the soap-xml produced by WCF I notice that many fields appear with their default values. Is it possible to instruct WCF somehow to omit such fields in serialization? Thanks. ...

How do i pass xml file to restful wcf

Hi i am developing a restful webservice in wcf. i have created a method in service file which takes a vuser(entity class) and process it and register that the user. The requirement is to send the vuser in xml format to the creatuser method. my question is how do i send the vuser to test my method in the xml format to the uri.Please help ...

SOAP Authentication is not being sent

We are in the process of moving some software from our test environment into a production test environment. We've ran into a problem where our service can't communicate with another 3rd party service. After a bit of packet sniffing I was able to figure out that when the message is being sent on the working system the POST has an Author...

WCF NetTcpBinding Buffered vs Streamed performance problems

I wrote a WCF service that should transform any size of files, using the Streamed TransferMode in NetTcpBinding, and System.IO.Stream object. When running performance test, i found significant performance problem. Then I decided to test it with Buffered TransferMode and saw that performance is two times faster! Because my service shoul...

What are the key features/benefits of RIA Services?

I am currently researching .NET RIA Services however I am having trouble finding a definitive list of the benefits of RIA services compared to plain WCF to Silverlight, or event a list of the key components that make up RIA Services. I also find it hard to see where RIA services sits in the development model and exactly what it provides ...

Importing ASMX Web Service metadata to WCF Endpoint

I am interested in impersonating well-known Web Services and Wcf Services for integration test purposes. To this end, I would like to capture service metadata, auto-generate service stubs, and host service stubs in a self-hosted environment. Following this article here, I am able to obtain remote Wcf Service metadata and generate contra...