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 442067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:02:06+00:00 2026-05-12T21:02:06+00:00

We have an ASP.NET MVC application for which we have developed our own custom

  • 0

We have an ASP.NET MVC application for which we have developed our own custom RoleProvider class. Without caching it will access the datastore for every request – bad. The only caching option we can find is (in web.config) via cookies stored on the clients’ machines. My two questions are:

  1. Is this secure (even with encryption enabled)?
  2. Will the cookie information be transmitted with every web request – thus, potentially, slowing the application more than accessing the datastore every time?

Does anyone have an alternative route? I understand that caching this information in the Session is also bad?

  • 1 1 Answer
  • 0 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-12T21:02:06+00:00Added an answer on May 12, 2026 at 9:02 pm

    If you have developed your own custom RoleProvider class, you can do your own data caching, e.g. using the ASP.NET cache. This is more flexible than using Session as a cache, since it will work even on pages that don’t have session state enabled.

    I don’t agree with Wyatt Barnett’s comment that:

    The downside for using the Session
    … the fact that Session storage is
    very violate and not particularly
    reliable

    It’s OK for a cache (whether Session, the ASP.NET Cache or something else) to be volatile – you just need to repopulate it when required.

    To answer your questions:

    1. It’s as secure as the encryption used to encrypt the cookie. If you’re relying on FormsAuthentication, it need be no less secure than the Forms Authentication ticket.

    2. The cookie will be transmitted with every request. So there is a potential performance hit if users can have a very large number of roles, and the potential to exceed the maximum cookie size supported by the browser.

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

Sidebar

Related Questions

I have a ASP.NET MVC application which is build up as an assembly that
I have an ASP.NET MVC 3 application which has a post action called Create
I have an .NET 4.0 ASP.NET MVC application, which also hosts a Workflow Foundation
I created a simple ASP.NET MVC version 1.0 application. I have a ProductController which
We have an ASP.NET application on ASP.NET 4.0 using MVC 3 which uses Windows
I developed an ASP.Net MVC v1 web application and it ran fine on our
We have ASP.NET MVC 3 application which is integrated with Google Checkout API .
I have an Asp.net MVC application which uses html5 and jquery on the client
I have an ASP.Net MVC application which runs fine on my local development machine.
I have a Asp.net MVC 3 application which I want to give to a

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.