这里的文章 :: http://www.microsoft.com/web/post/how-to-publish-a-web-application-using-webmatrix
声明要通过 FTP 发布,我必须“输入目标数据库的连接字符串”并给出示例。我不清楚是否必须替换当前的 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>