User.IsInRole
都导致如下错误:
我知道重启IIS会“解决”这个问题,但我想了解是什么原因导致这种情况,以便我可以确保在生产环境中不会发生此类问题。System.Threading.SemaphoreFullException: 添加指定数量的信号量将导致超过其最大计数。
堆栈跟踪的顶部是:
[SemaphoreFullException: 添加指定数量的信号量将导致超过其最大计数。] System.Threading.Semaphore.Release(Int32 releaseCount) +6065293 System.Data.ProviderBase.DbConnectionPool.PutNewObject(DbConnectionInternal obj) +57 System.Data.ProviderBase.DbConnectionPool.DeactivateObject(DbConnectionInternal obj) +338 System.Data.ProviderBase.DbConnectionPool.PutObject(DbConnectionInternal obj, Object owningObject) +163 System.Data.ProviderBase.DbConnectionInternal.CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) +117 System.Data.SqlClient.SqlInternalConnection.CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) +37 System.Data.SqlClient.SqlConnection.Close() +158 System.Web.DataAccess.SqlConnectionHolder.Close() +25 System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +847 System.Web.Security.RolePrincipal.IsInRole(String role) +182