I have a web application that I am developing. The application is tied to two data sources:
--A database running on a local copy of Microsoft SQL Express.
--A SQL Express database (aspnetdb.mdf) located in the App_Data directory of the root of my project.
The application is configured to for Internet Forms - about six users and three roles have successfully been created, and code exists that will assign master pages depending on the individual's role. The application works fine on my local machine.
I have deployed the site using "Publish Web Site" to a Server running IIS 6.0 and SQL 5.0. I have changed the connection string in the web.config file on the server to access the local data file (but nothing for aspnetdb.mdf). I can navigate to any page of the application (a help form, a "lost password" form, a "register form") that doesn't require access to the aspnetdb.mdf form. However, when I attempt to login through the page with the login control, I get the following error:
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."
...which, I believe, is pretty much telling me that the app doesn't know where to look for the login information (I'm guessing). There's nothing in web.config that addresses the the location of the aspnetdb.mdf form (or anywhere else in any of the code) -- so how does the app know to look in App_Data when I attempt to login?
What are the proper steps to take when deploying an application that uses this configuration? I haven't had much success in finding comprehensive information about this online.
Thanks!
Start Free Trial