将网站部署到运行 IIS7 的 Windows 2008 r2 服务器时遇到问题。我之前已将另一个站点部署到此服务器。 Web 部署正在连接并将我的文件复制到服务器,但我看到以下错误。
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 函数来设置远程服务器字符串的情况下发布。
我还在 Package/Publish SQL 选项卡中明确设置了目标和源数据库的连接字符串,但我不知道问题是什么。
有任何想法吗?
最佳答案
这正在发生在我身上,我设法隔离了问题......在手动添加了一个新的 SQL Server
之后。我的 Web.config
中的连接字符串尝试部署到远程服务器时,我开始遇到这个错误。
当我在 Visual Studio 2012 中打开 web 部署发布配置文件时,我注意到了 Settings
选项卡已设置此选项:在运行时使用此连接字符串(更新目标 Web.config) .
奇怪的是,这是由 VS 2012 自动设置的...
要解决此问题,只需取消选中该复选框,Web 部署应重新开始工作。
关于visual-studio-2010 - VS2010 web 部署连接字符串参数不能为 null 或为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11580680/