wcf

WCF sending the same exception even if the service endpoint address is valid

Hi, I'm running into a really strange problem with WCF. I need to implement some recovery behavior for WCF service if not reachable endpoint IP address received or service can not bind. The flow is simple if the application fail on exception on service creation it terminate it and request from user another IP address and perform anothe...

WCF can't connect to an ASMX Web Service

Hi All I'm using WCF to connect to a remote web service (asmx) for testing at this point. The remote web service is unsecured for now (no https, no user name, password). I can add the WCF service reference, and all the classes are generated ok. When I make the call to the webservice, it just hangs. So I can connect with the SOAP UI t...

How to execute some initial startup code on a IIS hosted WCF app?

I'm trying to find a hook / way to run some initial code to wire up a bunch of things before a service is called. any ideas? ...

How to define a message contract in WCF?

I've read that it is possible to define your own message contract in WCF, to give yourself complete control over the SOAP message. When would this be necessary, and how is it accomplished? ...

WCF Service Shutdown

I have a single instance WCF service class that is self hosted using a Windows service. I set up the service host in the OnStart event and I close the service in the OnStop event. In the service class I implement a destructor and I have some clean-up code in there. Essentially the clean-up code serialises some internal objects to disk f...

Relationship between SVC files and WCF projects?

When creating a WCF project, the default member files are just ordinary csharp class files, rather than svc files. Are svc files required with a WCF project? When should they be used? ...

Multi Tenant Service API for Business entities and Business logic

We have an application where we wish to expose an large number of database entities and some business logic. Each entity will require the ability to Read , Add, and Update. at this point we do not expect to allow deletion. the software we build is used in a wide range of business, so of which are multi tenanted operations Bureau ser...

ColdFusion 7 Client Calling Asp.NET / WCF Service

ColdFusion 7.0 Client will be passing form data to a asp.net web handler , the handler must parse the form data as present in the Request.context all this currently being done I now need to incorporate security between the sender and receiver. The messages must be encrypted and also both the client and the service must mutually authent...

Calling an Ajax-enabled WCF Application from AutoCompleteExtender

I'm trying to use a WCF service to fulfill MS Ajax AutoCompleteExtender completion list. I tried two alternatives. If I add a WCF service in my website project, AutoCompleteExtender calls it thriugh POST and it works fine. Then I decided to make a separate WCF Application and add my AJAX-enabled WCF service to new application. I also c...

WCF Service for many concurrent clients and database access

I'm new to WCF services and wondered what the best way to tackle the following would be. I have many clients (~200 - ~500) that are all making requests of my service fairly constantly during the working day. Most requests involve interrogation of an underlying database to feed the correct response back. What I'm concerned with is the p...

Prevent WCF client from deserializing

I have a WCF client proxy which reads from a SOAP web service. I do not control the service, only the client proxy. The result of invoking one of the operations of the service is defined as a very large XML schema, of which only a small subset is relevant in my application. I have created a custom WCF behavior which allows me to parse t...

Common cache for wcf services launched in different servicehosts

I'm hosting my WCF application with IIS. To serve some methods I need a reference to helper object which is heavily initialized. A good scenario is to initialise it once and put in a cache, then all requests just use the object from cache. How can I do caching? The easyiest way is to use static field of mywebmethod. IIS creates several ...

What is the point of WCF MaxReceivedMessageSize

The only time we notice this value appears to be when the service crashes because the value is too low. The quick way to fix this is to set it to some very large number. Then no problem. What I was wondering about is are there any negative consiquences to setting this value high? I can see that it can potentially give some protection f...

Prevent Named Pipes Conflict

We have a .NET program that uses WCF to listen for communication from another process. We used named pipes. ServiceHost host = new ServiceHost( typeof(Something), new Uri[] { new Uri("net.pipe://localhost") }); host.AddServiceEndpoint(typeof(ISomething), new NetNamedPipeBinding(), "Something"); host.Open(); The co...

[com.ctc.wstx.exc.WstxIOException: Socket closed Exception with WebLogic WebService interop with .NET WCF

We have an application that accepts an uploaded file, but intermittently throws a Socket closed exception. Client is .NET using WCF to connect to a WebService in WebLogic 10.3 using the JAX-WS annotations to create the web service. Intermittently, while uploading large files, we receive Socket closed exceptions and are having trouble d...

WCF contract for Field level update

I'm developing an application that does some CRUD operations through a WCF service. The read method returns a complete entity, the update is performed through a legacy system, and only the changed values should be updated. What is the best way to design the data contract for this scenario without simply sending a dictionary of key-value...

WCF logging messages

I have a WCF service (hosted by IIS webpage) that is working but I want to write more info out to a log file. I inherited code and it had some simple logging to a file. That worked on the original developers machine but I don't get anything written out. Note it reads the log file path from the config which I assume was the web config...

Guidance on .net web services

It's been a few years since I've done web services. I remember it to be fairly simply to create and consume one. In my current position, I work in a large organization and we use a lot of DB2 stored procedures the mainframe guy write for us to get at HR data. I'm now starting on a new HR project and rather than having the same ol' data...

wcf deserialize enum as string

I'm trying to consume a RESTful web service using WCF. I have no control over the format of the web service, so I have to make a few workarounds here and there. One major problem I cannot seem to get around, however, is how to make WCF deserialize an enum as a string. This is my code (names changed, obviously): [DataContract] public en...

Exception during multiple asynchronous calls to WCF (The message could not be processed...)

I am getting a "The message could not be processed..." error from a WCF client. Please help, it's killing me. I have a test win app that goes through a for loop to kick of x number of asynchronous calls. Each asynchronous call instantiates its own instance of a WCF proxy and calls a WCF service using that proxy. If x is about 35 or l...