Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:12:50+00:00 2026-06-10T04:12:50+00:00

I am continuing my previous question , as the reply lead to further doubts/points/concerns.

  • 0

I am continuing my previous question, as the reply lead to further doubts/points/concerns. I need help with the connection string on the web host server.

My connection string in the local computer is:

string connectionString = “Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\data.mdf;Integrated
Security=True;User Instance=True”;

Now, I simply used the website copy tool with the VS 2010, and the entire website is copied as it is on the web host, with the database being at domainName/httpdocs/Experiment/App_Data/data.mdf

Now, I don’t know how the complete connection string on the web hosting server look like. Some of the things which I learned, on the basis of those, I guess it should be:

string connectionString = “Data
Source=IP_Address_Of_WebHostingServer;AttachDbFilename=|DataDirectory|\data.mdf;User
ID=XXXX;Password=XXXX;User Instance=True”;

Is it right (or COMPLETE?)? Also, I have no clue what the user id or password is? So on local computer, with the help of Integrated Security=True the windows authentication was being made. How to do it on the remote web host?

In the webhosting console, I see features such as create database, create database users, I can see the username and password aspects there. If those are required then how do I connect that with the database I just copied? It seems like those are the one’s where database is created from scratch, while I already have the *.mdf (database) uploaded/copied.

I am stuck at this stage, and have no clue on how to proceed further. I know its something trivial, but out of scope of my knowledge. Please help me in completing the connection string. How do I make the database (data.mdf) file reachable/accessible?

I came across some articles which told to import the database and such (but where/why?), but I don’t get it. When the database is in the App_Data folder, then why/how do I do that?

I am confused, please help.I’ll highly appreciate step-by-step approach to fix it.Thanks.

EDIT (solution):

The solution given below is perfect. Apart from that this website/blog is worth checking.
— http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/asp-net-hosting-options-cs

And if you don’t have SQL Management Studio, best way to install is instructed here:
— http://blogs.msdn.com/b/bethmassi/archive/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010.aspx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:12:52+00:00Added an answer on June 10, 2026 at 4:12 am

    Step 1 – Create a DB Script from SQL Management Studio

    You will need to firstly script off you database schema and data (not as scary as it sounds – follow the steps here http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/ ) .

    Step 2 – Create your DB at HostGator and Import your DB Script

    Create your database at HostGator and import your script file (Follow this guide here http://support.hostgator.com/articles/plesk/plesk-9/how-to-create-or-import-databases-plesk-9 ).

    Step 3 – Update your connection string and deploy!

    You’ll need to update your connection string to be something like this (you will need to add your details).

    <add name=”CRMConnectionString” connectionString=”Data Source=Server IP;Initial Catalog=DBName;User ID=UserName;Password=Pwd;” providerName=”System.Data.SqlClient”/>
    

    This connection string was cribbed from this resource here http://asoftwaredeveloper.wordpress.com/2012/01/06/hostgator-web-hosting-and-mssql-db-access/

    Then publish your website and upload your files. Its worth noting that you won’t need to update your App_Data folder and its contents when you publish because you’ll be pointing at the DB on their server not the one in your directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Continuing a previous question I asked here , I now need to move to
I am continuing from my previous question I need a way to export my
I am continuing on from a previous question relating to loading instances of plugins
Continuing from a previous question , I keep searching for the optimal way to
Continuing my previous question . XML <albums> <album title=new_zealand> <album title=auckland> <image title=mt_eden_railroad_station/> </album>
Continuing my previous question Why I cannot derive from long? I found an interesting
Continuing on my previous question , I'm trying to initialize a session-scoped JSF bean
Thanks to the help in a previous question , I've got the following code
Continuing from my previous question which was solved by @Oleg. The solution seems to
Continuing from my previous question , is there a comprehensive document that lists all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.