页面服务器连接另一台数据库服务器报错百分在线等方案

uyou 2007-02-08 03:54:55
页面服务器连接另一台数据库服务器报错,奇怪的是用winform开发的应用程序就可以远程连接,且连接字符串(连接字符串保证无误)一样。

页面服务器:dotnet运行环境

数据库服务器:内网无ip地址,只有服务器名

报错:
Server Error in '/baseCode' Application.
--------------------------------------------------------------------------------

SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
baseCode.Inc.ConnectData.R_ExecuteSql(SqlCommand com)
baseCode.Inc.ConnectData.NewBook_Count()
baseCode._default.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
...全文
197 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Eri 2007-02-12
  • 打赏
  • 举报
回复
支持楼上说法。
winform用的是你的登陆权限,asp.net则是另外一个权限。
cat_hsfz 2007-02-11
  • 打赏
  • 举报
回复
权限问题吧,因为WinForm可以用当前登录去连接SQL Server,而ASP.NET的当前登录权限很小。
honkerhero 2007-02-10
  • 打赏
  • 举报
回复
连接字符串,把安全验证的SSPI改为false
jxf654 2007-02-10
  • 打赏
  • 举报
回复
up
uyou 2007-02-08
  • 打赏
  • 举报
回复
端口怎么写?
server=servername:1433
yan63 2007-02-08
  • 打赏
  • 举报
回复
用sqlserver的帐户登陆还是windows的信任连接?
如果是后者可能是asp.net运行的帐户没有权限,使用sqlserver的帐户登陆即可
rocy520 2007-02-08
  • 打赏
  • 举报
回复
链接 端口 也要一样
hertcloud 2007-02-08
  • 打赏
  • 举报
回复
你再 仔细 检查
链接 字符串

链接 端口 也要一样
maotin 2007-02-08
  • 打赏
  • 举报
回复
SQL Server是不是用的混和模式登陆 ?

110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧