Monday, March 12, 2012

Help ! Lost clients sites

"HELP !! We've lost about 25 client's websites. The databases were backed up along with all the actual files contained within each CSK….in addition, all the original databases are intact & can be reattached to the new SQL server…..the problem that exists where the original CSK files do not recognize the original database once it is reattached to the new SQL server. Any help would be most appreciated.

This is the error……

Login failed for user 'DARRYL1\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: Login failed for user 'DARRYL1\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: Login failed for user 'DARRYL1\ASPNET'.]

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

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

System.Data.SqlClient.SqlConnection.Open() +384

System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44

System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38

ASPNET.StarterKit.Communities.CommunityUtility.GetAllCommunitiesFromDB() +93

ASPNET.StarterKit.Communities.CommunityUtility.GetAllCommunities() +58

ASPNET.StarterKit.Communities.CommunityUtility.GetCommunityInfo() +327

ASPNET.StarterKit.Communities.CommunitiesModule.Application_BeginRequest(Object source, EventArgs e) +221

System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

It looks like you either haven't set up the ASPNET account as a user inSQL Server, or given it permissions on those databases. It's aneasy enough fix though. From Enterprise Manager, under theSecurity node for that SQL Server instance, make sure that the ASPNETaccount is listed as a login, and if not add it. Once it'sadded, on the "Database Access" tab of the properties sheet for thatacocunt, you can give it the appropriate access to each of thosedatabases, and you'll be back up and running.

No comments:

Post a Comment