Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer
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 '09 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 '09 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 '09 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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