0

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?

Thanks
Aaron

2
Contributors
4
Replies
6
Views
6 Years
Discussion Span
Last Post by Aaron44
0

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.

0

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
www.llama-tech.com/test1.aspx

Any help would be appreciated.
thanks

0

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.

thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.