Visual Studio 2013 -- deploy website with local sql database ?

Any ideas on how can I fix the below ?

Steps
 1. run app locally
 2. everything works
 3. deploy app to webserver
 4. make sure C:\inetpub\wwwroot\App_Data folder has .mdf database file
 5. go to http://localhost/Home/Contact on webserver
 6. works
 7. go to http://localhost/Home on webserver which displays details from .mdf database file
 8. get [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
finance_teacherAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
'localhost' Always refers to the computer you are on.  You can not use it to access another computer.  If the webserver is on another computer, you must use the hostname or IP address to access it.
0
finance_teacherAuthor Commented:
Correct, I am actually on the server after I deploy it
  ** i.e. above #5 says http://localhost/Home/Contact on webserver
0
Dave BaldwinFixer of ProblemsCommented:
Have you checked in the ODBC manager on the web server to see if the correct driver is there and that you can connect to the SQL Server with it?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Daniel Van Der WerkenIndependent ConsultantCommented:
What is your connection string for the database in your web.config?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.