How can I deploy my my sql database files of my website RRS feed

  • Question

  • Hi all,

    How can I deploy my website sql database files, which I have done using Visual web developer. (Visual Studio .net  2005)

    Connection srting all these are different in this VWD.


    <add name="GoalConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"

    providerName="System.Data.SqlClient" />



    Thursday, August 3, 2006 7:46 AM


  • Deployment to a web site tends to be specific to the Hoster you are using. Generally, you need to consider the following:

    • On the web site, don't use User Instances, that is a SQL Express specific function that is primarily for developer productivity.
    • You will need to change the Data Source to match your hosters server name.
    • You will likely need to get rid of AttachDbFilename and replace it with either Initial Catalog= or Database= with the name of the database provided to you by your hoster.

    If you're hosting the server yourself, you control all those things, but the same recomendations stand. For the web app, I would attach the database manually to the server and change the connection string appropriately. Check out the forums on http://www.asp.net for groups specific to using VWD to develop data bound web applications. You should find more information there about moving your application from development to production.


    Tuesday, August 8, 2006 4:04 PM