【发布时间】:2012-07-19 19:24:36
【问题描述】:
在将网站部署到运行 IIS7 的 Windows 2008 r2 服务器时遇到问题。我之前已将另一个站点部署到此服务器。网络部署正在连接我的文件并将其复制到服务器,但我看到以下错误。
1 The 'Connection String' argument cannot be null or empty
2 Web deployment task failed.((20/07/2012 14:19:16) An error occurred when the request was processed on the remote computer.)
(20/07/2012 14:19:16) An error occurred when the request was processed on the remote computer. Could not find a part of the path 'C:\Users\Me\Documents\Visual Studio 2010\Projects\MySite\MySiteClient\obj\Release\AutoScripts\EFDbContext-Deployment_SchemaOnly.sql'. 0 0 MySiteClient
我已验证该路径存在于我的本地计算机上。
我已尝试在不使用 web.config 转换的情况下发布,并使用 xdt:transform 函数设置远程服务器字符串。
我还在“打包/发布 SQL”选项卡中明确设置了目标数据库和源数据库的连接字符串,但不知道问题出在哪里。
有什么想法吗?
【问题讨论】:
-
完全用户错误。从我的 Web Config 导入后,我有两个 DB 条目 ApplicationServices 和 MyAppContext。我正在为第一个条目应用程序设置连接字符串,但没有为 MyAppContext 条目设置连接字符串。认为我忽略了这一点,因为我没有意识到连接字符串输入框随着数据库列表框中的选定条目而改变。呵呵.....
标签: visual-studio-2010 visual-studio iis-7 connection-string webdeploy