• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

How do I tranfer my VB.NET Application files to Windows Web Server 2008 ?


   I developed a ASP.Net and VB.Net website  and  I want to transfer my files to a dedicated Web server running windows server 2008 . I created a database in the SQL Management Studio in the server and I attached my MDF file and How I do establish a Connection String ? What are the things I have to mention in the web.config file .

      In my local system I just placed my mdf file in the App_Data folder and used it for development How do i establish a connection in web server 2008  ?
   
0
navinbabu
Asked:
navinbabu
1 Solution
 
RobertNZanaCommented:
In your web.config file you can create your connection string like this...
http://weblogs.asp.net/owscott/archive/2005/08/26/Using-connection-strings-from-web.config-in-ASP.NET-v2.0.aspx

For example...

<connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    <add name="MainConnStr" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|main.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now