Что может вызвать много исключений доступа к данным с использованием кода EF вначале в пользовательском RoleProvider?

Мой поставщик ролей выглядит как класс ниже (сокращенно). Я работаю на IIS Express и SQL 2012 Express от VS 2012, и я получаю множество на первый взгляд случайных исключений в этом коде поставщика ролей.

public class Educ8RoleProvider : RoleProvider
{
    private readonly Educ8DbContext _dbContext = new Educ8DbContext();
    private readonly Authorization _authorization;
    public Educ8RoleProvider()
    {
        _authorization = new Authorization(_dbContext);
    }
    public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
    {
        try
        {
            base.Initialize(name, config);
        }
        catch (Exception ex)
        {
            ErrorSignal.FromCurrentContext().Raise(ex);
            throw;
        }
    }
    public override bool IsUserInRole(string username, string roleName)
    {
        return GetRolesForUser(username).Any(r => r.ToLower() == roleName);
    }
    public override string[] GetRolesForUser(string username)
    {
        return _authorization.GetRolesForMember(username).Select(r => r.Name).ToArray();
    }
}

Вот образец моегоAuthorization учебный класс:

public class Authorization
{
    private readonly Educ8DbContext _dbContext;
    private readonly IMemberRepository _memberRepository;
    private readonly IRoleRepository _roleRepository;
    private readonly IMemberRoleRepository _memberRoleRepository;
    public Authorization(Educ8DbContext context)
    {
        _dbContext = context;
        _memberRepository = new MemberRepository(_dbContext);
        _roleRepository = new RoleRepository(_dbContext);
        _memberRoleRepository = new MemberRoleRepository(_dbContext);
    }
    public IQueryable<Role> GetRoles()
    {
        return _roleRepository.ListAll();
    }
    public IQueryable<Role> GetRolesForMember(int memberId)
    {
        var roleIds = _memberRoleRepository.ListAll()
            .Where(mr => mr.MemberId == memberId)
            .Select(mr => mr.RoleId);
        return _roleRepository.ListAll()
            .Where(r => roleIds.Contains(r.Id));
    }
}

Я получаю от двух до трех следующих исключений каждый час. Перезапуск проекта сразу решает проблему, до следующего.

Not allowed to change the 'ConnectionString' property. The connection's current state is closed. The context cannot be used while the model is being created. The underlying provider failed on Open.

Возможно, стоит отметить, что у меня абсолютно нет проблем с доступом к данным где-либо еще в проекте.

Любые предложения о том, что может быть причиной этого, будут приветствоваться.

Ответы на вопрос(1)

Ваш ответ на вопрос