首页上一页 1 下一页尾页 2 条记录 1/1页
ASP.NET从入门到精通—第22章新闻发布系统
发表在ASP.NET图书答疑
2010-09-22
是否精华
是
否
版块置顶:
是
否
老师您好:
我按照使用说明书将22章的数据库进行了附加,并且修改了配置文件,也将IIS修改了,在点击“浏览”的时候,出现了如下错误:
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------
用户 'WJTWHJ/BPSFTP' 登录失败。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 用户 'WJTWHJ/BPSFTP' 登录失败。
源错误:
行 83: {
行 84: SqlConnection myConn =GetConnection();
行 85: myConn.Open();
行 86: SqlDataAdapter adapt = new SqlDataAdapter(sqlStr, myConn);
行 87: DataSet ds = new DataSet();
源文件: g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\App_Code\CommonClass.cs 行: 85
堆栈跟踪:
[SqlException (0x80131904): 用户 'WJTWHJ/BPSFTP' 登录失败。]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
CommonClass.GetDataSet(String sqlStr, String TableName) in g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\App_Code\CommonClass.cs:85
_Default.Page_Load(Object sender, EventArgs e) in g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\Default.aspx.cs:19
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
我按相同的方法做了23章的例子,没有出现此类错误,运行良好!请老师给予解答,不胜感激!
我按照使用说明书将22章的数据库进行了附加,并且修改了配置文件,也将IIS修改了,在点击“浏览”的时候,出现了如下错误:
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------
用户 'WJTWHJ/BPSFTP' 登录失败。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 用户 'WJTWHJ/BPSFTP' 登录失败。
源错误:
行 83: {
行 84: SqlConnection myConn =GetConnection();
行 85: myConn.Open();
行 86: SqlDataAdapter adapt = new SqlDataAdapter(sqlStr, myConn);
行 87: DataSet ds = new DataSet();
源文件: g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\App_Code\CommonClass.cs 行: 85
堆栈跟踪:
[SqlException (0x80131904): 用户 'WJTWHJ/BPSFTP' 登录失败。]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
CommonClass.GetDataSet(String sqlStr, String TableName) in g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\App_Code\CommonClass.cs:85
_Default.Page_Load(Object sender, EventArgs e) in g:\学习光盘\asp.net光盘\mr\sl\22\NewsIssue\Default.aspx.cs:19
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
我按相同的方法做了23章的例子,没有出现此类错误,运行良好!请老师给予解答,不胜感激!