Home arrow Blog arrow Deploying site developed in Visual Web Developer Express
Deploying site developed in Visual Web Developer Express

This is to relate some gotchas I encountered while trying to deploy a site developed in Microsoft Visual Web Developer Express.


The Visual Developer ships with a website administration tool which handles things like logging of users and registering new ones. However, by default, it assumes that the database that will store this user info will be on the local machine. This works fine if you are just testing your site on on the local machine but when it comes to deployment, typically, the SQL Server  you will be using will be on a remote site.


For the remote site, there are a couple of things that you have to do. First, you have to set up the correct tables on the remote SQL Server. This can be done by invoking the wizard at C:\WINDOWS\Microsoft.NET\Framework\<versionNumber>\aspnet_regsql.exe and following the right prompts.

The other thing that you do is to tell your website to go ahead use this remote server. This was a little tricky and I had to struggle a little to find the right method. What you need to do is to edit the web.config file and add the following line in the configuration section


<connectionStrings>
 <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=yoursqlserver;Initial Catalog=yourdatabase;Persist Security Info=True;User ID=youruser;Password=yourpassword" providerName="System.Data.SqlClient"/>
<connectionStrings>

Here obviously you have to substitute your values for the SQL Server, and so on.

Show comments (0) - Add comments to this article:

 
< Prev   Next >

comments

There are no comments yet - feel free to add one using the form below...


Page 1 of 0 ( 0 comments )
©2006 MosCom

Add comments to this article: Deploying site developed in Visual ... ...

Enter your comment below.

Name (required)

E-Mail (required)
Your email will not be displayed on the site - only to our administrator
Homepage

Comment (supported) [BBcode]

Sponsored Links
Wednesday, 19 November 2008