This might be in the wrong area and been said a few times but I really need help.
I want my website to have a password area, I have setup all the pages but need to add it to my host. I have two databases ASPNETDB.MDF and aspnetdb_log.ldf what one do I upload and do I have to change them to .SQL?
How do I link my web.config file to the databases?
My host is GoDaddy. I do have a windows account with databases and ASP.
GoDaddy does not support attached databases so you have to first create a new DB through the mamagement form in your godaddy account and then generate script from your local database. Save as file if it's large and then import in the newly created DB. Once
you are done with this process back to the DB settings and copy the database conn string, username and pwd. Update your connectionstring tag in web.config and upload via FTP. Voila!
This is a bit rough tutorial but should help i believe.
Remember to click Mark As Answer when you get a reply which answers your question.
My Blog: ASP.NET Stuff
Marked as answer by Angie xu - MSFT on Dec 02, 2012 10:51 PM
1. Do not call your Database "ASPNETDB.MDF", if you have shared hosting chances are someone has already deployed a Db called that. The Db names are not just unique to your site, but across your server.
2.You have to create a Database from the control panel in GoDaddy.
3.You have to get the connection string for that database and you must use that in your web.config file.
4. You have to get your database schema onto the GoDaddy database you created. The easiest in my opinion is to use SSMS(SQL Server Management Studio) to connect to the databas using the connection string you got from GoDaddy. Then you can create the tables
from your .\SqlExpress database you used in testing. You other option is to use SSMS to create a back-up (.BAK) of your database. Then at the Go Daddy control panel restore your database using the back-up.
Hope it helps!
Doers get what they want! Everyone else gets what they get.
Marked as answer by Angie xu - MSFT on Dec 02, 2012 10:51 PM
markrml
0 Points
3 Posts
Adding database to host and connection strings
Nov 25, 2012 07:44 PM|LINK
Hi,
This might be in the wrong area and been said a few times but I really need help.
I want my website to have a password area, I have setup all the pages but need to add it to my host. I have two databases ASPNETDB.MDF and aspnetdb_log.ldf what one do I upload and do I have to change them to .SQL?
How do I link my web.config file to the databases?
My host is GoDaddy. I do have a windows account with databases and ASP.
Please can someone help!!
Kulrom
Contributor
4834 Points
893 Posts
Re: Adding database to host and connection strings
Nov 25, 2012 09:28 PM|LINK
GoDaddy does not support attached databases so you have to first create a new DB through the mamagement form in your godaddy account and then generate script from your local database. Save as file if it's large and then import in the newly created DB. Once you are done with this process back to the DB settings and copy the database conn string, username and pwd. Update your connectionstring tag in web.config and upload via FTP. Voila!
This is a bit rough tutorial but should help i believe.
My Blog: ASP.NET Stuff
remojr76
Participant
902 Points
303 Posts
Re: Adding database to host and connection strings
Nov 25, 2012 09:29 PM|LINK
There is still a lot you have to do.
1. Do not call your Database "ASPNETDB.MDF", if you have shared hosting chances are someone has already deployed a Db called that. The Db names are not just unique to your site, but across your server.
2.You have to create a Database from the control panel in GoDaddy.
3.You have to get the connection string for that database and you must use that in your web.config file.
4. You have to get your database schema onto the GoDaddy database you created. The easiest in my opinion is to use SSMS(SQL Server Management Studio) to connect to the databas using the connection string you got from GoDaddy. Then you can create the tables from your .\SqlExpress database you used in testing. You other option is to use SSMS to create a back-up (.BAK) of your database. Then at the Go Daddy control panel restore your database using the back-up.
Hope it helps!