BlogEngine.NET DB Problems

Topics: ASP.NET 2.0, Controls
Feb 2, 2009 at 10:34 PM
Hi,

I am new to this blogengine.net and asp.net.  Once, I installed it on IIS server and everything else worked fine for me.  When I was trying to save a post or to edit a post, it gaves me below errors.  Even though, errors occurred, but the post was saved somehow.  Please help.  I will greatly appreciate for your help.  Thanks in Advance.

Chad

Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'xxxx\xxxx'.

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. 

[SqlException (0x80131904): Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'icqcommunicatio\Administrator'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
   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
   System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo) +93

[HttpException (0x80004005): Unable to connect to SQL Server session database.]
   System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e) +229
   System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo) +383
   System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling) +205
   System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +179
   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +560
   System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs) +160
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Feb 3, 2009 at 1:56 AM
It looks that you are using SQL server for session state management. Blogengine stores lot of data in cache. You may want to check your configuration of session state database connection.
Feb 3, 2009 at 11:11 PM
Hi,

I am not using sql server for this blog.  It has nothing to do with it.  I don't understand why it causes errors when I try to post a post or update a post.  Thank you for taking your time replying to my questions.  Any other ideas?

Thank in Advance,
Chad
Feb 4, 2009 at 1:29 PM
You may not be using SQL for the blog data, but based on the error you posted, you do have it set to use SQL for your session data.  Look at your web.config file and look for the <sessionState> element.  Change the mode from SQLServer to InProc or whatever it should be in your case.