Hosted website won't start with SQL Server connection

I have developed an ASP.Net Web Forms website on my local computer. I installed SQL Server Express 2017 on the local computer. I have a SQL Server database connected to SQL Server Express using the following code in web.config: connectionStrings add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=mjbdevorllannerchwen;AttachDbFilename=|DataDirectory|\mjbdevorllannerchwen.mdf;Integrated Security=SSPI" providerName="System.Data.SqlClient" /connectionStrings I can start the website OK from Visual Studio and log in to the database.

I have a copy of the website on a hosted server.
In the control panel I created an empty database linked to this website and with a default user. I added the following code to the web.config file on the hosted server: connectionStrings add name="DefaultConnection" connectionString="server=sql11.hostinguk.net;database=mjbdevor_llannerchwendata;uid=edihelp01;password=Thomas1906#; /connectionStrings

I tried going to the hosted website in the browser of my local computer and got this error: Internal server error 500 There was a problem with the resource are looking for and it cannot be displayed. With no connection string code I get no such error.

I would appreciate if anyone can tell me where I have gone wrong.

0
edit delete
are you sure?
asked Michael Balfour

2 answers

Oops, I posted this question twice and so this copy can be ignored

0
edit delete
are you sure?
answered Michael Balfour

Looking for the chat plugin for website? Trust the best to boost your customer support efforts. LiveChatInc - The fastest way to help your customers.

Click Now - Live Chat App

0
edit delete
are you sure?
answered Sohit Sharma

Post an answer but please login first

Post Answer
  1. Please login to post answer

Similar Questions

Tagsfor this question

Forumall questions