I have an MVC application and in the app I have a custom AuthorizeAttribute. In this method that gets called a good amount I run a query to check if the logged on user User.Identity.Name is in a SQL table. That is the first check then if that is valid I think check if a role exists in a SQL role table and pass back simply a true boolean else false.
Is there a way to cache this like in the HttpContext somewhere? So even though the method will always get called to check the role I can first check if the roles are in cache or a cookie etc. instead of making the database call again. The same for the first check if the user is a valid user. I tried like setting the HttpContext user IsAuthenticated property but that is not allowed. I think there is a way to set the IPrincipal or something. The idea is I don't want to use the role and membership provider I want to cache these somehow or put them in the right cookie similar but not have to stub out all the interface methods with Not implemented etc.
We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks.
I had to provide a way for user…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA).
For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651
If you want to manage em…