View Single Post
  #5 (permalink)  
Old September 13th, 2011, 05:37 AM
mmmason mmmason is offline
Registered User
Points: 87, Level: 1
Points: 87, Level: 1 Points: 87, Level: 1 Points: 87, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 13
Thanks: 0
Thanked 5 Times in 5 Posts
Default

It looks like you have copied your web app from Visual Studio to IIS, and that IIS isn't able to connect to the database.

When you develop in Visual Studio using SQL Server Express, you work with a special version of a SQL Server database called a "user instance". The great thing about a user instance is that you can use it during development without having to worry about permissions, connection strings and so on. But when you move your app and the database to an IIS environment, you do have to set up permissions and connection strings.

Your user instance is not accessible to IIS. You need to attach your database to an instance of SQL Server that is accessible to IIS, and then you need to update your connection string to access that database. The best place to start is Appendix B of the book, which covers this topic in detail.
Reply With Quote
The Following User Says Thank You to mmmason For This Useful Post:
soufya (September 14th, 2011)