VS2010 web部署连接字符串参数不能为null或为空 [英] VS2010 web deploy the connection string argument cannot be null or empty

查看:1095
本文介绍了VS2010 web部署连接字符串参数不能为null或为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将网站部署到运行IIS7的Windows 2008 r2服务器时遇到问题。我之前已经将另一个站点部署到此服务器。 Web部署正在连接并将我的文件复制到服务器但我看到以下错误。

Having problems deploying a website to an windows 2008 r2 server running IIS7. I have previously deployed another site to this server. The web deploy is connecting and copying my files to server but I see the following error(s).

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

我已验证我的本地计算机上存在该路径。

I have verified that the path exists on my local machine.

我尝试使用web.config转换进行发布,并使用xdt:transform函数设置远程服务器字符串。

I have tried publish with out web.config transforms and with using the xdt:transform functions to set the remote server strings.

I还在Package / Publish SQL选项卡中显式设置了目标和源数据库的连接字符串,并且不知道问题是什么。

I have also explicitly set the connection strings for both destination and source database in the Package/Publish SQL tab and am at a loss as to what the problem is.

有什么想法吗?

推荐答案

现在正在发生这种情况,我设法解决问题...手动添加新的<$ c后$ c> SQL Server 我的 Web.config中的连接字符串尝试部署到远程服务器时,我开始遇到此错误。

This was happening right now to me and I managed to isolate the problem... after manually adding a new SQL Server connection string in my Web.config I started experiencing this very error when trying to deploy to the remote server.

当我在Visual Studio 2012中打开Web部署发布配置文件时,我注意到它在设置选项卡下设置了此选项: 在运行时使用此连接字符串(更新目标Web.config)

When I opened the web deploy Publish profile in Visual Studio 2012 I noticed under the Settings tab that it had set this option: Use this connection string at runtime (update destination Web.config).

奇怪的是这是由VS 2012自动设置的......

Strangely this was setup automatically by VS 2012...

要解决此问题,只需取消选中该复选框,然后再进行Web部署即可重新开始工作。

To solve the problem, just uncheck that checkbox and web deploy should start working again.

这篇关于VS2010 web部署连接字符串参数不能为null或为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆