我的应用程序无法在其他计算机上运行 [英] My application has failed to work on other computers

查看:86
本文介绍了我的应用程序无法在其他计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!当我在Visual Studio 2005中创建我的应用程序(在另一台PC上)时,它成功地部署在PC上.但是在运行(例如登录表单)应用程序后,它带来了sql server 2005错误,但我使用了sql server2000,这可能是探针.

解决方案

您有SQL Server吗?安装在目标数据库计算机上?

如果将应用程序安装在PC上,并希望访问该计算机上的SQL数据库,则它需要安装SQL Server.

否则,如果这是一个单用户数据库,请考虑改用SqlCE-它不需要.NET外部的组件才能运行.连接.或者,也许您需要一个不同的连接字符串.目标计算机似乎具有SQL Server 2005,并且由于您仅在SQL Server 2000上进行了测试,因此像这样进行部署可能不是一个好主意.因此,要么将其部署在具有SQL Server 2000的计算机上,要么使用SQL Server 2005/2008在本地测试您的应用程序,以确保您的代码/连接字符串仍能按预期工作.


您好,rajesh !很抱歉延迟回复.错误:建立与服务器的连接时发生错误.连接到SQL Server 2005时,此故障可能是由于在默认设置下SQL Server不会进行远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接)


Hi guys! When i deploy my application (on a different PC) i created in visual studio 2005 it deploys successfully on the PC. But after running(e.g login form) the application it brings an sql server 2005 error yet i used sql server2000 what could be the probelem.

解决方案

Do you have SQL server installed on the target database machine?

If you install your app on a PC, and expect to access an SQL database on that machine, then it needs to have SQL server installed.

Otherwise, if this is a single user database, consider using SqlCE instead - it requires no components external to .NET to run.


It seems SQL server is not correctly configured on that machine to allow connections. Or perhaps you need a different connection string. The target machine seems to have SQL server 2005 and since you''ve only tested on SQL server 2000, it may not be a good idea to deploy it like that. So either deploy it on a machine that has SQL server 2000 or test your app locally with SQL server 2005/2008 to be sure that your code/connection strings still work as expected.


Hi rajesh! Sorry for the delay in replying. The error: an error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may caused by the fact that under the default settings SQL Server does not remote connections. (provider: named pipes provider, error: 40 - could not open a connection to SQL Server)


这篇关于我的应用程序无法在其他计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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