Refused by SQLExpress

by: Mattias Nordgren

Yesterday I almost killed myself after struggling with an error during an installation of EPiServer CMS on Vista. I got this error message when trying to browse the web site:

(provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

So, I spent a few hours trying to find out what was the problem and I never realised I just had to address the instance. All guides I found on Google pointed in the remote connections solutions, which also is a common problem for many users. Then, after some research I found out that I made a mistake and didn't address the instance correctly.

If you're running SQLExpress in instance mode and is configuring your connection strings manually, make sure you reference the INSTANCE of the SQLExpress, like this: servername\instance (myServer\SQLExpress).

<add connectionString="Data Source=myServer\SQLExpress;Database=dbEPiServerCMS;User ID=episervercms;Password=password;Network Library=DBMSSOCN;" name="EPiServerDB" providerName="System.Data.SqlClient" />

You can also use other notations, like

<add connectionString="Data Source=.\SQLExpress;

<add connectionString="Data Source=(local)\SQLExpress;

I don't know if this is a very common beginners mistake, but I hope this blog post might help someone.

Auf wiedersehen!

Mattias

04 January 2008


Comments

Post a comment    
User verification Image for user verification  
Mattias Nordgren

About me

I'm a Product Manager within the Product Management group at EPiServer AB. Previously I worked as a Sales Engineer in the global sales organisation mainly supporting Scandinavian partners and sales staff.


Syndications


Archive


Tag cloud

EPiTrace logger