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

Any ideas on how can I fix the below ?

 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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.
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
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?

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?
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

From novice to tech pro — start learning today.