CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  ASP.NET

Asp.net 2.0页面出错,数据库连接问题?

楼主newhand2004(阿华)2006-07-01 08:24:18 在 .NET技术 / ASP.NET 提问

我VDW   2005编写页面,web.config中连接字符窜定义为  
          <add   name="UserConn"   connectionString="Data   Source=.\SQLExpress;Integrated   Security=true;AttachDBFileName=|DataDirectory|aspnetdb.mdf;User   Instance=True"  
        providerName="System.Data.SqlClient"   />  
  数据库是SQLexpress2005,我在办公室机子上用以上配置可以正常工作,可在家里用同样配置的机子却出现以下页面错误,请问原因:  
   
   
  页面出错信息:  
  Server   Error   in   '/gagl'   Application.  
  --------------------------------------------------------------------------------  
   
  Cannot   open   user   default   database.   Login   failed.  
  Login   failed   for   user   '26FC73D7BED140F\ASPNET'.    
  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:   Cannot   open   user   default   database.   Login   failed.  
  Login   failed   for   user   '26FC73D7BED140F\ASPNET'.  
   
  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   (0x80131904):   Cannot   open   user   default   database.   Login   failed.  
  Login   failed   for   user   '26FC73D7BED140F\ASPNET'.]  
        System.Data.SqlClient.SqlInternalConnection.OnError(SqlException   exception,   Boolean   breakConnection)   +735043  
        System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject   stateObj)   +188  
        System.Data.SqlClient.TdsParser.Run(RunBehavior   runBehavior,   SqlCommand   cmdHandler,   SqlDataReader   dataStream,   BulkCopySimpleResultSet   bulkCopyHandler,   TdsParserStateObject   stateObj)   +1838  
        System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean   enlistOK)   +33  
        System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection   owningObject,   SqlConnectionString   connectionOptions,   String   newPassword,   Boolean   redirectedUserInstance)   +628  
        System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity   identity,   SqlConnectionString   connectionOptions,   Object   providerInfo,   String   newPassword,   SqlConnection   owningObject,   Boolean   redirectedUserInstance)   +170  
        System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions   options,   Object   poolGroupProviderInfo,   DbConnectionPool   pool,   DbConnection   owningConnection)   +359  
        System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection   owningConnection,   DbConnectionPool   pool,   DbConnectionOptions   options)   +28  
        System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection   owningObject)   +424  
        System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection   owningObject)   +66  
        System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection   owningObject)   +496  
        System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection   owningConnection)   +82  
        System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection   outerConnection,   DbConnectionFactory   connectionFactory)   +105  
        System.Data.SqlClient.SqlConnection.Open()   +111  
        System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext   context,   Boolean   revertImpersonate)   +84  
        System.Web.DataAccess.SqlConnectionHelper.GetConnection(String   connectionString,   Boolean   revertImpersonation)   +197  
        System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String   username,   Boolean   updateLastLoginActivityDate,   Int32&   status,   String&   password,   Int32&   passwordFormat,   String&   passwordSalt,   Int32&   failedPasswordAttemptCount,   Int32&   failedPasswordAnswerAttemptCount,   Boolean&   isApproved,   DateTime&   lastLoginDate,   DateTime&   lastActivityDate)   +1121  
        System.Web.Security.SqlMembershipProvider.CheckPassword(String   username,   String   password,   Boolean   updateLastLoginActivityDate,   Boolean   failIfNotApproved,   String&   salt,   Int32&   passwordFormat)   +105  
        System.Web.Security.SqlMembershipProvider.CheckPassword(String   username,   String   password,   Boolean   updateLastLoginActivityDate,   Boolean   failIfNotApproved)   +42  
        System.Web.Security.SqlMembershipProvider.ValidateUser(String   username,   String   password)   +83  
        System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs   e)   +160  
        System.Web.UI.WebControls.Login.AttemptLogin()   +105  
        System.Web.UI.WebControls.Login.OnBubbleEvent(Object   source,   EventArgs   e)   +99  
        System.Web.UI.Control.RaiseBubbleEvent(Object   source,   EventArgs   args)   +35  
        System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs   e)   +115  
        System.Web.UI.WebControls.Button.RaisePostBackEvent(String   eventArgument)   +163  
        System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String   eventArgument)   +7  
        System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler   sourceControl,   String   eventArgument)   +11  
        System.Web.UI.Page.RaisePostBackEvent(NameValueCollection   postData)   +33  
        System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint,   Boolean   includeStagesAfterAsyncPoint)   +5102 问题点数:20、回复次数:2Top

1 楼smile9961(good life)回复于 2006-07-01 09:15:41 得分 20

Cannot   open   user   default   database.   Login   failed.  
   
  Login   failed   for   user   '26FC73D7BED140F\ASPNET'.Top

2 楼newhand2004(阿华)回复于 2006-07-01 09:16:57 得分 0

???Top

相关问题

关键词

得分解答快速导航

  • 帖主:newhand2004
  • smile9961

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo