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

王朝other·作者佚名  2006-02-01
窄屏简体版  字體: |||超大  

上一篇文章中提到的访问注册表的问题,我找到答案了,是因为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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航