I recently installed Windows 7 on my computer, and just set up Visual Studio 2010 and SQL Server 2008. On my old installation, I used VS 2008 and SQL Server Express 2005. I have a simple ASP.NET application that uses membership. It worked on my old installation, but when I transferred it to the new one, the application refuses to connect to the SQL Server. Can anybody please explain to me the correct way to tell ASP.NET to connect to it? Thanks in advance!

2 Answers 2


You should check the membership connection string It could be in web.config of your web site and in machine.config It is better if you override the settings in web.config See example here

By default SQL Server Express 2005 is installed using named instance, like localhost\SQLEXPRESS and SQL Server 2008 could be installed like default instance, localhost

You should also install all tables/procedures required for membership using aspner_regsql tool see how to do this here

  • Thanks a lot, this helped, but the problem is that I can't see the server from anywhere at all, or access it. Configuration Editor tells me it's running, but that's all I know.
    – edobry
    Jul 16, 2009 at 13:24
  • You should enable SQL Browser service. See in start menu Configuration Tools, SQL Server Surface Area, Configuration of Services, SQL Server Browser, Startup type = automatic, Start. Also in Remote Connections enable TCP/IP or Named pipes, or both. Also, if other users will connect on TCP/IP you should allow connection to 1433 port in windows firewall. Search Serverfault - there should be a lot of answered questions related to SQL Browser service or TCP/IP configuration
    – Bogdan_Ch
    Jul 17, 2009 at 7:31
  • Thanks, I tried that, but the SQL Server service refuses to start, it says that the service's side-by-side configuration is incorrect. Anyway, I'm using a MS Access data provider now, and that works, but thanks for all your help.
    – edobry
    Aug 1, 2009 at 17:32

First, if you're logging into a domain, you may have to log in as the local administrator instead and add your domain user account as a sysadmin in SQL Server. Then you can get SSMS to work.

Second, IIS 7 uses different user permissions. And the defaults changed from IIS 7.0 to 7.5 too. Check event logs for the SQL exception messages that should say which account it's try to connect as. You can also edit the identity of the IIS application pool to read or change that identity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.