Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 872109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:44:10+00:00 2026-05-15T10:44:10+00:00

I am developing an ASP.NET MVC app with custom membership and role providers. My

  • 0

I am developing an ASP.NET MVC app with custom membership and role providers.

My custom role provider uses LinqToEntities to query the user/role mapping table and retrieve if a user is in a role or not.

When running on debug, local machine, everything is fine. When deploying on IIS7 however, I have this strange behavior:

When I change roles to a user, and then login with that user, it retains the old roles, instead of the new ones. It’s like they are cached somewhere, but I already set the cacheRolesInCookie="false" option in the Web.config

Reading on the web, I saw that the option I mentioned is just a directive for the provider, meaning if I don’t implement its usage, it will be ignored, is that right?

This leaves me puzzled. My provider should perform a fresh query every time a method is called. It works locally, but not on the deploy machine with IIS7.

Anyone knows if there’s any hidden setting in IIS7 to make things work right?

Thanks.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:44:11+00:00Added an answer on May 15, 2026 at 10:44 am

    After a long time I found the solution.

    The problem was residing on the EF context I was using to read the users/roles.

    I fixed it resintantiating the context every time a role is checked, instead of keeping the same context until application restarted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an e-commerce app using asp.net mvc. After user successfully logged into
I´m developing an ASP.NET MVC app that uses EF 4.1 Code First. I have
I am developing asp.net mvc web app with MongoDB as the data storage. I
I'm developing a mobile app using ASP.Net MVC to generate HTML 5 pages. The
I'm developing an ASP.NET MVC application that will send the user a confirmation email.
We are developing an ASP.NET MVC Application that currently uses it's own database ApplicationData
I am developing an ASP.NET MVC app and I've been looking into using Data
I am developing an asp.net MVC web app in which I am using Linq
I'm developing an ASP.NET MVC app. I'm working with Syncfusion's PdfDocument (ver 7.303.0.20) in
I am developing a ASP.NET MVC web app under .NET 3.5, NHibernate and hosted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.