Posted by: joachimvandenbogaert | June 4, 2009

Deploying WCF on IIS 6.0 with Certificates, NHibernate and Membership

Get a server that allows you to run .NET 3.5

In most cases you will get a Windows Server that is configured with .NET 3.0, so you will first have to install .NET 3.5 on it in order to use WCF. This is not so difficult, but you need to have the right configuration. From 3.0. .NET 3.5 does not install automatically. You have to make sure that you have Windows Installer 4.5 installed, which you can find here

.NET 3.5 can (redistributable package) be found here

Configure ASP.NET and WCF for IIS 6.0

Next, open a command line window and go to the Microsoft.NET directory (typically C:\Windows\Microsoft.Net\Framework or C:\Windows\Microsoft.Net\Framework64).

  • Go to the v2.0.50727 dir and run aspnet_regiis -i
  • Go to the v3.0\Windows Communication Foundation dir and run ServiceModelReg -i
  • Make sure that ASP.NET 2 Web Service extensions are allowed, otherwise you will get a 404 error when opening an svc file.  In the IIS management console, click [Web Server Extensions] and make sure that ASP.NET v2.0.507272 is set to [Allowed]




Configure the host header in order to publish the correct host on the svc web page: open the IIS management console, right-click your website, select [Properties] and on the [Web Site] tab click the [Advanced …] button.

Web Site Properties

Web Site Properties

This brings up a new dialog. Click the ip-address for wgich you want to change the identification from localhost to the web site’s ip-address and click the [Edit …] button.

Advanced Web Site Identification

Advanced Web Site Identification

Now you can edit the [Host Header value] field. Click [OK] to accept the changes.

Edit Web Site Identification

Edit Web Site Identification

Configuring Postgres to allow your website to access your databases

If you followed the described procedure, you change your website’s id for some applications from “localhost” to whichever ip-address you are using. It took me some time to figure out what was going on, but apparently Postgres complains about access rights, not configured in pg_hba.conf. So if you want to do this, make sure you add an entry in pg_hba.conf, for example:

host all all password

this will allow the host with the IP-address to access postgres using password credentials.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: