1

How can I publish my website in Webmatrix that uses a database, using Web Deploy?

My connection string has the configuraions of my local database. Should I change the configurations before publish using the webmatrix publisher?

Is there any best practice to avoid the need to change the connection in web config in all publish times?

Ronaldo
  • 357
  • 2
  • 8
  • 21

1 Answers1

1

Please follow this article

http://www.microsoft.com/web/post/web-development-101-part-9-deploying-your-site

You need to set the connectionstring of your server database instead of your local database on your computer.

Take a look on Using different Web.config in development and production environment to set configuration for both enviornment dev and production.

Community
  • 1
  • 1
Anirudha Gupta
  • 9,073
  • 9
  • 54
  • 79
  • but how do I tell WebMatrix that I want to use the Web.Release.config when publishing and _not_ the Web.Debug.config? the article you pointed to doesn't mention config files at all – ekkis Jul 07 '14 at 01:24
  • You can better look at IIS forum (iis.net). The Internet is all about learn new stuff. – Anirudha Gupta Jul 07 '14 at 10:52