Category: WCF

Publishing WCF Web Service on IIS

Today, I will show you how to to publish WCF Web Service on IIS. I assume your have a working version of your WCF on IIS Express and you want to "publish" it. Step 1 - Install IIS Go to: Control Panel Programs and Features Turn Windows Features On and Off There are 4 things

Continue Reading

Tracing of WCF services - code example

Tracing can be very beneficial especially when the application has already been deployed and we need to figure out why things do work. Useless errors of type HTTP 500 don't give any meaningful results, so I decided to use System.Diagnostics to help me track down the errors. Logging There are two important (and very simplifed

Continue Reading

Returning Http Error as Response in WCF

This is arguably one of the more irritating things in WCF, but as it turns out for good reason. WCF is meant to expose services 'universally' of their endpoint i.e. it shouldn't matter how you connect to the server, the service is independent of the underlying protocol. Therefore, returning HTTP errors from WCF service, well,

Continue Reading

Automated WCF RESTful System Testing with VS

Lately, we've been playing around a lot with WCF. Unit testing WCF services is not exactly challenging (well done Microsoft), but it seems that with unit tests it is quite difficult to test certain behaviour, for example, authentication or authorization. There are other means of developing automated tested system tests, but they are not that

Continue Reading

Remember to close files: the process cannot access the file '' because it is being used by another process

I was building a simple web system which relied on XML files. On initiation, the system would open the XML config file, read it and include other XML files defined in it:

The operation was done within a WebForm and it worked just fine. I also had a WCF service whose job was to

Continue Reading