這裏 文章:: http://www.microsoft.com/web/post/how-to-publish-a-web-application-using-webmatrix如何從WebMatrix的
指出,通過FTP發佈我必須「輸入連接字符串爲目標數據庫」,並給出一些例子設置的web.config數據庫的ConnectionString用於出版DotNetNuke的。我不清楚我是否必須替換當前的web.config字符串,或者如果我添加一個。我也不明白是否必須將一個標記爲目標數據庫。
這是我到目前爲止。當我訪問網站時,它說「正在建設中」。知道如何從狀態中解脫出來並打開日誌錯誤會很有幫助。
<!-- this is the local connection -->
<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient" />
<!-- this is the destination db -->
<add name="myConnectionStrings" connectionString="Server=205.xxx.xxx.xxx;Database=mydbname;uid=mydbusername;pwd=mydbpasswd;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<!-- Connection String for SQL Server 2005/2008 Express - kept for backwards compatability - legacy modules -->
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" />
.
.
.
</appSettings>
我覺得這是關鍵,我的煩惱:「負責,一旦FTP發佈完成後在服務器上更改了數據庫連接字符串在web.config」。我正在更改正在部署的web.config上的字符串。 – sandraqu