.net mssql2000出现下面症状,解决方案?
说明:1、在服务器上 mssql2000查询分析器,zwweb能登陆。
2、web.config里 <add name="sql" connectionString="Data Source=.;Initial Catalog=SBW46(811);User ID=aaaa;Password=aaaa" providerName="System.Data.SqlClient"/> 在其他服务器上这样配置都能正常登陆,是数据库问题,还是操作系统服务没起来?<title>无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.er {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head> <body bgcolor="white"> <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>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. <br><br> <b> Exception Details: </b>System.Data.SqlClient.SqlException: 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>Line 94: {
Line 95: string sql = "update news set click = click + 1 where pkId = " + pkid;
<font color=red>Line 96: zhan.Data.Sql.PubClass.ExecuteSql("", sql);
</font>Line 97: }
Line 98: //统计访问量</pre></code> </td>
</tr>
</table> <br> <b> Source File: </b> d:\fjedu_zw\App_Code\Z_Pub.cs<b> Line: </b> 96
<br><br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>[SqlException (0x80131904): 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。
用户 'zwweb' 登录失败。]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
zhan.Data.Sql.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) in F:\zhan\Data\Sql\SqlHelper.cs:456
zhan.Data.Sql.SqlHelper.ExecuteNonQuery(CommandType cmdType, String cmdText, SqlParameter[] commandParameters) in F:\zhan\Data\Sql\SqlHelper.cs:65
zhan.Data.Sql.PubClass.ExecuteSql(String connection, String sql) in F:\zhan\Data\Sql\PubClass.cs:240
Z_Pub.AddNewsClick(String pkid) in d:\fjedu_zw\App_Code\Z_Pub.cs:96
GetNewsClick.GetClick(String pkid) in d:\fjedu_zw\ajax\GetNewsClick.ashx:19
GetNewsClick.ProcessRequest(HttpContext context) in d:\fjedu_zw\ajax\GetNewsClick.ashx:12
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
</pre></code> </td>
</tr>
</table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 </font> </body>
</html>
<!--
[SqlException]: 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。
用户 'zwweb' 登录失败。
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at zhan.Data.Sql.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) in F:\zhan\Data\Sql\SqlHelper.cs:line 456
at zhan.Data.Sql.SqlHelper.ExecuteNonQuery(CommandType cmdType, String cmdText, SqlParameter[] commandParameters) in F:\zhan\Data\Sql\SqlHelper.cs:line 65
at zhan.Data.Sql.PubClass.ExecuteSql(String connection, String sql) in F:\zhan\Data\Sql\PubClass.cs:line 240
at Z_Pub.AddNewsClick(String pkid) in d:\fjedu_zw\App_Code\Z_Pub.cs:line 96
at GetNewsClick.GetClick(String pkid) in d:\fjedu_zw\ajax\GetNewsClick.ashx:line 19
at GetNewsClick.ProcessRequest(HttpContext context) in d:\fjedu_zw\ajax\GetNewsClick.ashx:line 12
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--><!--
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
说明:1、在服务器上 mssql2000查询分析器,zwweb能登陆。
2、web.config里 <add name="sql" connectionString="Data Source=.;Initial Catalog=SBW46(811);User ID=aaaa;Password=aaaa" providerName="System.Data.SqlClient"/> 在其他服务器上这样配置都能正常登陆,是数据库问题,还是操作系统服务没起来?<title>无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.er {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head> <body bgcolor="white"> <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>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. <br><br> <b> Exception Details: </b>System.Data.SqlClient.SqlException: 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。<br>用户 'zwweb' 登录失败。<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>Line 94: {
Line 95: string sql = "update news set click = click + 1 where pkId = " + pkid;
<font color=red>Line 96: zhan.Data.Sql.PubClass.ExecuteSql("", sql);
</font>Line 97: }
Line 98: //统计访问量</pre></code> </td>
</tr>
</table> <br> <b> Source File: </b> d:\fjedu_zw\App_Code\Z_Pub.cs<b> Line: </b> 96
<br><br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>[SqlException (0x80131904): 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。
用户 'zwweb' 登录失败。]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
zhan.Data.Sql.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) in F:\zhan\Data\Sql\SqlHelper.cs:456
zhan.Data.Sql.SqlHelper.ExecuteNonQuery(CommandType cmdType, String cmdText, SqlParameter[] commandParameters) in F:\zhan\Data\Sql\SqlHelper.cs:65
zhan.Data.Sql.PubClass.ExecuteSql(String connection, String sql) in F:\zhan\Data\Sql\PubClass.cs:240
Z_Pub.AddNewsClick(String pkid) in d:\fjedu_zw\App_Code\Z_Pub.cs:96
GetNewsClick.GetClick(String pkid) in d:\fjedu_zw\ajax\GetNewsClick.ashx:19
GetNewsClick.ProcessRequest(HttpContext context) in d:\fjedu_zw\ajax\GetNewsClick.ashx:12
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
</pre></code> </td>
</tr>
</table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 </font> </body>
</html>
<!--
[SqlException]: 无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。
用户 'zwweb' 登录失败。
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at zhan.Data.Sql.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) in F:\zhan\Data\Sql\SqlHelper.cs:line 456
at zhan.Data.Sql.SqlHelper.ExecuteNonQuery(CommandType cmdType, String cmdText, SqlParameter[] commandParameters) in F:\zhan\Data\Sql\SqlHelper.cs:line 65
at zhan.Data.Sql.PubClass.ExecuteSql(String connection, String sql) in F:\zhan\Data\Sql\PubClass.cs:line 240
at Z_Pub.AddNewsClick(String pkid) in d:\fjedu_zw\App_Code\Z_Pub.cs:line 96
at GetNewsClick.GetClick(String pkid) in d:\fjedu_zw\ajax\GetNewsClick.ashx:line 19
at GetNewsClick.ProcessRequest(HttpContext context) in d:\fjedu_zw\ajax\GetNewsClick.ashx:line 12
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--><!--
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
解决方案 »
- asp.net如何做页面布局?
- Quartz.net如何在web程序中使用?
- 'ASP.NET Web服务' 和 'ASP.NET网站' 的区别?
- 如何输入一个字符的Ascii值
- 关于用javaScript动态操作TreeView节点的添加与删除。
- 帮BB取名
- webrequest 的问题
- 郁闷 !!!! 为什么.net写的网站会这么慢
- 下面是Web.config文件,我想把下面ACCESS数据,改成SQL数据库,如何改?
- DataGrid中对项修改,删除时可否通过页面中DataGrid外的修改,删除按钮(分别一个)来实现??
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器
- 求救,大家快来看看
说明:1、在服务器上 mssql2000查询分析器,zwweb能登陆。
2、web.config里 <add name="sql" connectionString="Data Source=.;Initial Catalog=SBW46(811);User ID=aaaa;Password=aaaa" providerName="System.Data.SqlClient"/> 在其他服务器上这样配置都能正常登陆,是数据库问题,还是操作系统服务没起来? <title>无法打开登录 'SBW46(811)' 中请求的数据库。登录失败。 <br>用户 'zwweb' 登录失败。 </title> 是一个用户吗,看还有没有别的配置串,或者程序给写死了?
同样的程序,在其他服务器上都能用的好好的