wcf

How to disable auto-generated WCF configuration

Every time my program runs vs adds the default configuration to my app.config file. At that run it works fine, but at the next run it actually tries to read the config. The problem is that the default configuration has errors, it adds the attribute "Address", but attritbutes are not allowed to have capitals so it throws an exception. T...

Setting custom WCF-binding behaviour via .config file - why doesn't this work?

I am attempting to insert a custom behavior into my service client, following the example here. I appear to be following all of the steps, but I am getting a ConfigurationErrorsException. Is there anyone more experienced than me who can spot what I'm doing wrong? Here is the entire app.config file. <?xml version="1.0" encoding="utf-8"...

Pattern for verifying authenticity of a request to WCF service

I have a client app that makes calls to a WCF service. This app is on a public computer that's easily accessible and anyone can easily copy the .EXE and .CONFIG of my app into another machine and start using it. Is there a pattern where I can check if the request is coming only from an app on a computer I installed it on and not on one ...

How to add version number in WSDL for a WCF service?

Hi All, I am looking for adding a version number to the wsdl that gets created for a WCF service. Let me know whether it is a good practice to add the version number as a part of data contract or at the soap headers? if so how to do it? This version number would be helpful to find out the latest wsdl. Thanks & Regards, Priya.R ...

OData and custom WCF WebGet methods

I've created an OData endpoint (using entity framework, WCF data service) and added a custom test WebGet test method like so: [WebGet(UriTemplate = "{text}")] public IQueryable<string> SplitString(string text) { if (text == null) throw new DataServiceException("text not specified"); var result = (from s in t...

Keep user connected with WCF

Hi, Context : I would like to create WCF Service that can be consumed by an ASP.NET web app and an iphone application. My goal : Create an SOA architecture. My problem : How "keep the user connected" on the WCF service? I tried asp.net membership provider with wcf and that works fine. But the problem is that I have to give username/p...

Entity References with Services and Repositories

Hi, I am trying to get myself accustomed with TDD, DI and Pattern-based Development. I am by far not new to Application Development, but since I plan to start a (big) new Project in a few months I want to be prepared and do it right from the start ;). The current architecture is based on a WCF-based AppServer, a MS SQL Database and WPF/...

How to programmatically connect a client to a WCF service?

Hello. I'm trying to connect an application (the client) to an exposed WCF service, but not through the application configuration file, but in code. How should I go about doing this? Thanks. ...

Add Reference to a WCF Service Executable

I have 3 projects in my solution. 1 - client, 2 - server, 3 - WCF service library. Server executable exposes the service provided in the library. I need to add a reference to it, rather than to the library directly. When I open "Add Service Reference" and click "Discover", it only lists the library data, and doesn't list the executable s...

"port forwarding": redirect calls to webservice at port 8081 to port 80

Hi, a colleague of mine wrote a webservice that runs on port 8081 of our Windows 2008 Server. He uses the class ServiceHost, afaik this means its a standalone host (no IIS or ASP involvement). Note: I'm new into WCF ;) Now there are some issues with clients behind a firewall blocking the requests to remote port 8081 of our server (wher...

WCF configuration file: why do we need clientBaseAddress in Binding section?

Hi, There are three sections in WCF configuration for service client: Look at bindings => clientBaseAddress Why do we need to specify callback address? Is this field required? Why .NET is unable to determine the address of client? Does it mean that i can specify client endpoint that is located on some other machine? <configuration...

How to limit a request execution time of WCF service?

Is there something in WCF configuration that defines a timeout for executing a request at service side? E.g. WCF service will stop executing request after some time period. I have a service which make some work depending on client input. In some cases a such call may take too much time. I want to limit the execution time of such requests...

Mono WCF NetTcp service takes only one client at a time

While trying to build a client-server WCF application in Mono we ran into some issues. Reducing it to just a bare example we found that the service only accepts one client at a time. If another client attempts to connect, it hangs until the first one disconnects. Simply changing to BasicHttpBinding fixes it but we need NetTcpBinding for...

Error in WCF service - Silverlight client communication.

I created a WCF service and I planned to consume this in a Silverlight application. So I created the WCF service in the Website host project. The service is a simple WCF service that only returns a number - something like a Hello World WCF-SL. So after adding a service reference in the silverlight client project to the Service URI, after...

implementing Ws-security within WCF proxy

Hi, I have imported an axis based wsdl into a VS 2008 project as a service reference. I need to be able to pass security details such as username/password and nonce values to call the axis based service. I have looked into doing it for wse, which i understand the world hates (no issues there) I have very little experience of WCF, but...

Does WCF use TCP and not UDP as one of it's transport mechanisms because UDP is not guaranteed ?

Hi, Reading about WCP (woof, what a monster of a subject), and just into the earlier stages of what transports are available. I note that TCP is available, but not UDP. Is this because UDP is not always reliable...lossy with packets ? Thanks, Scott ...

wcf service not showing Publish option Why?

Hi all, I written one WCF service after that i am trying to Publish(after Build) this service. But solution not showing Publish Option and also not creating any .svc file in the solution why? Thanks in advance. Regards, Rajesh ...

migrating webclient to WCF; WCF client serializes parametername of method

I'm struggling with migrating from webservice/webclient architecture to WCF architecture. The object are very complex, with lots of nested xsd's and different namespaces. Proxy classes are generated by adding a Web Reference to an original wsdl with 30+ webmethods and using xsd.exe for generating the missing SOAPFault objects. My pilot W...

How to call WCF Service Method Asycroniously from Class file?

I've added WCF Service reference to my asp.net application and configured that reference to support asncronious calls. From asp.net code behind files, i'm able to call the service methods asyncroniously as shown in the bellow sample code. protected void Button1_Click(object sender, EventArgs e) { PageAsyncTask pat = new P...

Interface(s) inheriting other interface(s) in WCF services.

In my solution there's a few WCF services, each of them implementing it's own callback interface. Let's say they are called: Subscribe1, with ISubscribe1 and ICallback1, etc. It happens there are a few methods shared among ICallbacks, so I made a following interface: interface ICallback { [OperationContract] void CommonlyUsedMe...