For examle you have database "Test.mdf" created at SQL Server Management Studio Express.OR
1st step: your database must be detached from your SQL server correctly: open management studio -> right click on "Test" database -> Tasks -> Detach.
2nd step: create folder www/App_Data and copy Test.mdf without log file.
3 step: generate connection string at https://www.qsh.eu/admin/EditFreehosting.aspx and save in web.config.
4 step: replace name="LocalSqlServer" with (for example) name="DBAccess".
5 step: in code you can read connection string from web.config:
string connectionString = ConfigurationManager.ConnectionStrings["DBAccess"].ConnectionString;
IDbConnection connection = new SqlConnection(connectionString);
replace name="DBAccess" with (for example) name="LocalSqlServer" in all ASPX
the stupid method i did once...
Login Link for www.qsh.eu
https://www.qsh.eu/admin/Login.aspx
免費asp.net空間(www.qsh.eu)使用詳解
http://www.0379zd.com/news/show/17001.htm
Qantasoft qsh.eu webconfig connectionString problem
http://forums.asp.net/p/1253493/2356606.aspx#2356606
沒有留言:
發佈留言