我正在使用ASP.NET會員狀態的MySQL會話狀態提供程序。我以前在配置MySQL網站配置實用程序的會話狀態提供程序和工具,說幹就幹,創建了以下的模式:「表'users.my_aspnet_Sessions'不存在」
Tables_in_users
my_aspnet_applications
my_aspnet_membership
my_aspnet_profiles
my_aspnet_roles
my_aspnet_schemaversion
my_aspnet_sessioncleanup
my_aspnet_sessions
my_aspnet_users
my_aspnet_usersinroles
它的自動會話清理實用工具不斷拋出下面的異常問題:
與數據源通信發生異常。
Action: CleanupOldSessionsException: MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'users.my_aspnet_Sessions' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Web.SessionState.MySqlSessionStateStore.DeleteTimedOutSessionsWithCallback()
at MySql.Web.SessionState.MySqlSessionStateStore.DeleteTimedOutSessions()
at MySql.Web.SessionState.MySqlSessionStateStore.CleanupOldSessions(Object o)
這個例外是完全有效的,'users.my_aspnet_Sessions'確實不存在。有沒有辦法解決問題?我錯過了配置中的東西嗎?
我已經嘗試重命名錶,但由於連接器的其他組件仍然期望當前名稱,所以會產生其他異常。
任何幫助將不勝感激。
謝謝你的時間。
你有一個單獨的數據庫爲用戶和另一個爲您的交易?或者一切都在一個數據庫中? –
截至目前,所有事情都在一張桌子上。 – digitalmonkey
有同樣的問題。在我的情況下,我知道原因,只是缺少解決方案...我的數據庫在Linux服務器中,因此表名是區分大小寫的...... MySQL創建一個名爲my_aspnet_sessions的表,並在提供程序中的某個地方嘗試將其作爲my_aspnet_Sessions – Sergio