Creating a WCF Operation Invoker to handle exceptions

by David Kiff 23. September 2009 15:25

I found myself repeating the same old try..catch logic within our WCF services.  Quite often we would catch specific exceptions and re-throw them as fault exceptions, whereas the rest required logging and re-throwing.

I decided to create a wrapper around the class responsible for invoking the operations.  That will allow us to add a generic try..catch around every operation, that we apply the behaviour to.More...

Tags: , ,

WCF

Setting up SSL for WCF in Development

by David Kiff 22. September 2009 11:27

This blog post will describe how to secure your WCF services that are hosted within IIS 7.0, using Secure Sockets Layer.

Secure Sockets Layer (SSL) is a protocol primarily used for encryption of data between two parties, running at the Transport Layer.More...

Tags: , , , ,

WCF

WCF Inversion of Control “Service Constructor” and better Unit Testing!

by David Kiff 28. August 2009 15:40

When creating a WCF service that is hosted in IIS using the .svc file, you need to specify the Service attribute in the directive.  The value of this service attribute is the fully qualified type name of service file (the one that contains the implementation of the service).  More...

Tags: , ,

WCF

WCF Open Service Host Error

by David Kiff 17. February 2008 06:31

WCF "Your process does not have access rights to this namespace"

This is the error message I received when starting a WCF service in windows vista. The problem is down to Vista security restrictions (UAC) not allowing applications to open ports (start listening on a port).

There are a few ways to resolve this issue:

  1. Run the WCF host with administrative rights (not recommended) by right clicking your .exe and selecting “run as administrator”.
  2. Use netsh.exe to allow a user to start listening on the port(s) you specify:
    “netsh http add urlacl url=http://+:8080/ user=COMPUTERNAME\USERNAME”

This example allows the username specified to start listening on port 8080 with any IP address or hostname.

To find a list of commands run “netsh http”.

Domain Users: Replace “COMPUTERNAME” with the name of your domain.

Tags:

WCF