I have created a csharp script that connects to my sqlexpress database. It works perfectly in my test environmnet. When I upload the web application to discount asp.net I cannot connect to the database using the hookUp command.
The web.config file is working, I can connect to the database and display data using a gridview.

the hookUp command is as follows

hookUp = new SqlConnection("Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_773669_llama;User ID=SQL2008R2_773669_llama_user;Password=*******");

Can anyone see any obvious errors?


1) Let me See an example of your web config ?

2) Can you logon to the server , using SQL manament studio and see if you can connect , to test this use the credentials you provided in the web config.

connection string as follows

<add name="ConnectionString" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_773669_llama;User ID=SQL2008R2_773669_llama_user;Password=******"
providerName="System.Data.SqlClient" />

I can display data from the database to a grid view so It would seem the connection string works.

I dont know if I can use sql management studio with a database hosted by discountasp.com

I have also tried linq to sql and get the following error.

An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately

the website I am testing is www.llama-tech.com/test.aspx and

Any help would be appreciated.

I have just connected to the database hosted by discountasp.net using sql management studio.

Discountasp rocks!!

I have solved the problem now. Thanks for your help
I needed to compile the web application locally and then publish the bin folder.

Problem Solved.