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!
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
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.