visual-studio-2010 - VS2010 web 部署连接字符串参数不能为 null 或为空

标签 visual-studio-2010 visual-studio iis-7 connection-string webdeploy

将网站部署到运行 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 部署应重新开始工作。

enter image description here

关于visual-studio-2010 - VS2010 web 部署连接字符串参数不能为 null 或为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11580680/

相关文章:

visual-studio-2010 - 在源代码中放置超链接

c++ - 错误 C3861 : 'ResGain' : identifier not found

iis-7 - IIS 7 的 URL 重写模块

iis-7 - 如何通过命令行停止/启动IIS 7应用程序?

c# - 从 ASP.NET Web 应用程序运行 .exe 的权限问题

初始化 DX 时出现 C++ 访问冲突

c++ - 将我自己的函数添加到 OpenCV

c++ - 如何在不使用 MFC 的情况下将用户输入捕获为变量、执行计算,然后在另一个控件中显示结果?

c# - CSC : error CS7038: Failed to emit module

C++ 简单字符检查