I had a conversation yesterday regarding
WCF service contract design with my tech lead at work. Funnily enough, I then got a comment on an old post that afternoon from Ciaran O'Neill which is really about the same topic. I thought that I should write up my thoughts on the subject. See here for the article.
Tags: WCF
243552ba-2c12-493d-a83a-47184c49e418|0|.0
There are cases when you need to transmit username/password credentials to WCF without transport security. The times that you should do this are rare because of the obvious security implications of sending credentials over the wire without encryption. One case where this is required is where hardware acceleration is used in a load balancer. The traffic between the load balancer and the client is encrypted, but the traffic between the load balancer and the service host is not. The issue here is t...
[More]
Tags: Useful Links, WCF
2d5e4c69-a5dd-4c8c-941d-dd3e88ae9829|0|.0
A common problem with service security is that username/password security is needed for authentication and authorization at the service boundary, but those same credentials are also required to consume other resources such as a database or underlying service. By default, username/password security will run the authentication and authorization of the credentials but only the username is available to the executing service code. This is typically made available through Thread.CurrentPrincipal.Ident...
[More]
Tags: WCF, Extensibility
3b9d1257-5844-40a8-88c9-59ee0a3cdf34|6|4.8
As soon as I read about IErrorHandler in Juval Lowy's book, I was sold. This interface in WCF is excellent to use for error handling and shielding at service boundaries. The interface comes with two methods. ProvideFault allows you to handle the error and determine what is returned to the client. This is where exception shielding comes in. The service implementation or any of the layers in the service can throw an exception. The error handler is the opportunity to determine whether the exce...
[More]
Tags: WCF, Tracing
dc04b3e8-6e44-4d68-813f-265b79a315cf|6|4.2
I have been doing a lot of work over the last week writing xml comment documentation. I have been compiling the xml output into chm files using SandCastle,
SHFB and my own
SHFB wrapper application. I have been increasingly been finding that I am writing remarks that I want to reuse across different methods and properties of several classes in an assembly. Today, I had a particular property scattered among several data contracts for a
WCF service that are used for the same purpose and have th...
[More]
Tags: WCF, Sandcastle
4307b613-a834-43b0-b8dd-7e14837f11cc|0|.0
I posted the other day that I wanted to create some static analysis rules for
Visual Studio. I have some great ideas for several rules that I want to write in order to do two things. Firstly, I want rules to pick up common mistakes made in coding. Secondly, the rules can be used to enforce coding standards via the Code Analysis
TFS checkin policy.
To enforce coding standards, I have previously written xpath and regex
TFS checkin policy implementations that work off a set of defined rules. I found t...
[More]
Tags: TFS, WCF
9ceb305a-b105-4d98-ad9f-38d29a1a110c|0|.0
We encountered an interesting issue at work over the last week. We are writing WCF services and implementing transport security to communicate with IIS. For local development, we had certificates created by a certificate server and configured onto the local IIS. As you would expect, the certificates used the machine name for the common name of the certificate. This is after all the standard procedure. The problem encountered is that the web application project in
Visual Studio stores the url of the proj...
[More]
Tags: WCF
0e39b9a2-a730-448a-a13f-c322994cf672|0|.0
Yesterday I got the opportunity to start playing with
WCF net.tcp services hosted in WAS on Windows Server 2008 (Beta 2). There were a couple of hiccups, but it was surprisingly painless.
Firstly, I got the service up and running over wsHttpBinding. One thing I noticed about this is that, unlike XP Pro (and I think Vista), IIS7 on WS2008 doesn't need anonymous set against the svc file for the service endpoint when the rest of the site was running under Windows Authentication. S...
[More]
Tags: WCF
813fd2dd-86ad-4af2-a7be-75d8331b4698|0|.0
I'm just about to get a new laptop which will be running Vista. This got me thinking about the installation order for VS2005. There are so many bits and pieces to install, but what is the correct order. This is what I'm thinking. Vista IIS Sql Server 2005 Visual Studio 2005 Team System Visual Studio 2005 MSDN documentation Visual Studio for Database Professionals Microsoft Visual Studio 2005 - Update to Support Web Application Projects (this is included in VS SP1) Sql Server 2005 SP2...
[More]
Tags: WF, WCF, WPF
dc70741a-f69b-4f97-b281-b1cd195e2135|1|5.0
If you have an ASMX client, you can get it to call a WCF endpoint with some restrictions. You have to use the basicHttpBinding on the WCF service and the service implementation (or contract) needs to be decorated with the XmlSerializerFormat attribute. I have encountered a problem under SSL though. I am wanting to use username/basic authentication with the service over SSL. This article makes the following reference: The easiest straightforward way for a successful interoperability scenari...
[More]
Tags: ASP.Net, WCF
276c3d4c-4b55-48d2-b67a-a5236cba83d9|0|.0