您的位置:程序门 -> .net技术 -> c#



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


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


页面服务器连接另一台数据库服务器报错百分在线等方案
发表于:2007-02-08 15: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
发表于:2007-02-08 16:12:381楼 得分:0
sql   server是不是用的混和模式登陆   ?
发表于:2007-02-08 16:25:102楼 得分:0
你再   仔细   检查  
链接   字符串

链接   端口   也要一样
发表于:2007-02-08 16:31:073楼 得分:0
链接   端口   也要一样
发表于:2007-02-08 16:31:174楼 得分:0
用sqlserver的帐户登陆还是windows的信任连接?
如果是后者可能是asp.net运行的帐户没有权限,使用sqlserver的帐户登陆即可
发表于:2007-02-08 16:37:365楼 得分:0
端口怎么写?
server=servername:1433
发表于:2007-02-10 12:24:406楼 得分:0
up
发表于:2007-02-10 12:45:357楼 得分:0
连接字符串,把安全验证的sspi改为false
发表于:2007-02-11 11:00:028楼 得分:0
权限问题吧,因为winform可以用当前登录去连接sql   server,而asp.net的当前登录权限很小。
发表于:2007-02-12 13:56:259楼 得分:0
支持楼上说法。
winform用的是你的登陆权限,asp.net则是另外一个权限。


快速检索

最新资讯
热门点击