本机装了vs2005,连接其自带数据库sql express,运行正常,把部署后的文件放到测试机器上时出现如下错误,其测试机器仅装.net2.0的框架。
Server Error in '/ ' Application.
--------------------------------------------------------------------------------
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
请各位指教!!谢谢
------解决方案--------------------------------------------------------
使用InstallShield X以上版本,可以把数据库和framework都打包进去,很方便.
就是InstallShield 使用说明不多,大部分靠自己阅读示例,全英文
而且,需要11.5以上版本的InstallShield SP1才行,但一旦安装成功,打包还是很方便的