I know there is a high possibility of this question being asked by many people. but I’m very confident that I have read most of those questions and still wasn’t able to find solution.
below are all the steps I have done so far in details in order to deploy my web application on the Godaddy hosting servers:
-
I am using ASP.NET MVC 3 (C#).
-
I have uploaded and deployed the website on godaddy hosting services.
-
I have inserted my database by executing the Script I generated from my SSMS into the godaddy MS SQL server database.
Finally, according to this I was able to get my connectionString.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<connectionStrings>
<add name="database-name" connectionString="Data Source=mysource; Initial Catalog=database-name; User ID=userid; Password=password;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
However, I’m still not able to connect my web application to its database when I try it on the internet. I’m very sure that my connectionString is correct since it’s been just copy-pasted from my host service provider.
I am pretty sure I have missed something except my webconfig or my connectionString. Is there anything else except web.config file that is critical and has effects on connection?
Regards,
Amin
EDIT:
Sorry to not mention earlier. I DID put the correct “name”, “Data Source”, “Data Source”, “User ID” and “Password”.
I intentionally changed them for security purposes.
SECOND EDIT:
There is no error when I try to fetch the data in my application.. the response is just simply null from the database. But my tables DOES exist in the database with all the data inside.
Does the Database instance accept http traffic? Can you locate and connect to it from e.g. SQL Management Studio?