又一个数据库的访问权限错误

上一篇文章中提到的访问注册表的问题,我找到答案了,是因为 EntLib 库要注册( w2003 下我还没有试,为什么我也还没全搞明白,我的 windows application 是可以用的,为什么这时的 EntLib 没注册也可以呢???,大家可看看这篇文章 http://community.csdn.net/Expert/topic/4306/4306143.xml?temp=.5033838 ),问题解决后又有一个新的问题,如上如下所示。好半天,我都不知为什么,所有的安全权限的地方我都找了,终于在计算机管理中,不小心看到了系统日志,说我的数据库没有登录,如下所示

** Data connection failed to open: database=gtgadb;integrated security=true;server=(local); ** **

**

** 有关更多信息,请参阅在 ** ** http://go.microsoft.com/fwlink/events.asp ** ** 的帮助和支持中心。。 ** **

**

** 终于在 ** ** sqlserver ** ** 中加了一个 ** **_ ASPNET _ ** **_ 用户,问题解决!!!不知大家有什么好的做法,我这是没办法的办法了。 _ ** **

**

**


**

**_ 用户 _ ** **_ '154532\ASPNET' _ ** **_ 登录失败。 _ ** **

**

** 说明 ** ** : ** 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

** 异常详细信息 ** ** : ** System.Data.SqlClient.SqlException: 用户 '154532\ASPNET' 登录失败。

** 源错误 ** ** : **

行 195 : else

行 196 : {

行 197 : reader = database.ExecuteReader(commandWrapper);

行 198 : }

行 199 : }


** 源文件 ** ** : ** d:\web\gtgaweb\dataaccesslayer\sqlclient\sqlbmproviderbase.cs ** ** ** 行 ** ** : ** 197

** 堆栈跟踪 ** ** : **

[SqlException: 用户 '154532\ASPNET' 登录失败。 ]

System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)

System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)

System.Data.SqlClient.SqlConnection.Open()

Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()

Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper command)

gtgaweb.DataAccessLayer.SqlClient.SqlBMProviderBase.GetAll(TransactionManager transactionManager, Int32 start, Int32 pageLength) in d:\web\gtgaweb\dataaccesslayer\sqlclient\sqlbmproviderbase.cs:197

[RepositoryException: An data access error occured, please check inner SqlException error.]

gtgaweb.DataAccessLayer.SqlClient.SqlBMProviderBase.GetAll(TransactionManager transactionManager, Int32 start, Int32 pageLength) in d:\web\gtgaweb\dataaccesslayer\sqlclient\sqlbmproviderbase.cs:202

gtgaweb.DataAccessLayer.SqlClient.SqlBMProviderBase.GetAll(Int32 start, Int32 pageLength) in d:\web\gtgaweb\dataaccesslayer\sqlclient\sqlbmproviderbase.cs:160

gtgaweb.DataAccessLayer.Bases.BMProviderBase.GetAll() in D:\web\gtgaweb\DataAccessLayer\Bases\BMProviderBase.cs:91

Web.WebForm1.Page_Load(Object sender, EventArgs e) in d:\web\gtgaweb\web\webform1.aspx.cs:29

System.Web.UI.Control.OnLoad(EventArgs e)

System.Web.UI.Control.LoadRecursive()

System.Web.UI.Page.ProcessRequestMain()



** 版本信息 ** ** : ** Microsoft .NET Framework 版本 :1.1.4322.2032; ASP.NET 版本 :1.1.4322.2032

Published At
Categories with Web编程
Tagged with
comments powered by Disqus