MS SQL Express 2008 upgrade headache...Cannot connect...Instance  failure.

Posted on 2009-02-23
Last Modified: 2013-11-27
Decided to put MS SQL Express 2008 on my Windows Server 2003 machine to replace MSSE2005.  All was working fine with the website with the 2005 version.  

Now, however, I can build and then connect to the site through the MS Visual Web Developer Express 2008, but when I try to hit the web site remotely, I get the 'failure to create an instance...'

I've uninstalled and installed several times.  When I try to get to the website remotely, I make sure the VWDE2008  is closed and not locking any files.  I've set the SQL service to run as 'Local System'; I've looked for stray \SQLEXPRESS directories to delete.

Very frustrating that everything works in the VWDE, but not when I try to connect remotely.  This was not a problem when using the 2005 VWDE and 2005 SQL Express.

Any help would be greatly appreciated.
Question by:trinfo
    LVL 41

    Expert Comment

    So, show us the connection string you're using....   remember that the Express editions are expecting to provide [Your Server name]\SQLEXPRESS in the connect string

    Author Comment


     <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\App_Data\ASPNETDB.MDF;Integrated Security=False;Connect Timeout=120;User ID=./Administrator;Password=XXXXXX" providerName="System.Data.SqlClient"/>

    Changed to:  

    <add name="ConnectionString" connectionString="Data Source=PSDXW701\SQLEXPRESS;AttachDbFilename=|DataDirectory|\App_Data\ASPNETDB.MDF;Integrated Security=False;Connect Timeout=120;User ID=PSDXW701/Administrator;Password=XXXXXX" providerName="System.Data.SqlClient"/>

    Still no luck.  :-(
    LVL 41

    Expert Comment

    It appears as if you're using the "User Instance" feature of SQL Server...  where you are explicitly mounting an *.MDF file just for your application.   Is this what you were intending?  If so, then you should add/change to:
              Integrated Security=True;
              User Instance=True"

    There is a pretty good write-up on User Instances here:
    Recall that in the non-User Instance scenario, the user must  have Administrator rights to mount the database via the AttachDbFilename feature


    Accepted Solution

    graye thanks for the input.  I originally had these parameters, and then changed to what you see now with a username with all rights.

    I've decided to abandon MS SQL Express 8.  I was only using it for authentication.  I'm now using page authentication with another db and a little home grown code.

    Something got messed up in the internals on that machine when I added MSSE8...and, this small re-write is easier than spending another two days on it.

    Again, thanks for the effort!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now