Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Connection string in web.config works properly on local machine.

When I host the website on server, connection string does not work and gives an error 'Database not available'.

In connection string I give user id & password of server correctly, but still not working.
Posted
Updated 16-Nov-10 21:34pm
v2
Comments
Dalek Dave 17-Nov-10 3:34am    
Edited for Grammar, Syntax and Readability.
thatraja 17-Nov-10 3:39am    
Hey, why did you put your server IP & UserID/Password details? Do you want to hack your server by hackers? I changed it. Here after don't give the actual server & login details anywhere (Not only this site) which is safe.
thatraja 19-Nov-10 10:45am    
Actually you have posted the thing from web.config here, don't you have the file now? You are asking the password to me :-(. Really sad. Find your web.config in your system & get it.

1 solution

The database may be different from local to server. Make sure you have the connection string in web.config in server with server credentials.
 
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