Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am new to hosting a website online and because of that, I have been encountering a problem for the past week. I have created a dynamic website which needs to connect to the database on the host's server but nothing shows up in the controls that are supposed to hold the data retrieved from the database.
I have changed the data source variable in my webconfig file several times but to no avail. And I am suspecting it's my connectionstring which may be the problem.
This is what I am doing right now:

XML
<connectionStrings>
    <add name="ApplicationServices" connectionString="data source=host domain name;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=false"/>
    <add name="StudentDBConnectionString" connectionString="Data Source=host domain name;Initial Catalog=StudentDB;Persist Security Info=true;User ID=usermame;Password=password" />  </connectionStrings>




I would be glad, if someone to could guide me on how to solve this problem.
Posted
Updated 9-Sep-13 13:05pm
v3
Comments
[no name] 9-Sep-13 18:53pm    
You need to talk to your hosting provider.
OsoJames 9-Sep-13 19:15pm    
@ThePhantomUpvoter, thank you for the response, I will do that.

1 solution

Usually the hosting providers do not allow attaching databases via the connection string (DataDirectory) and you must explicitly do this in the database web UI first.

But contact your provider for better help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900