I need to give different session length to users according to a certain role. Since session length is configured in program.cs I tried to check the role in it. The problem that in order to us IsInRole(...) function I need to know who is the current user which I don't. Is it possible to do it like that? Any other way to do it?
change session length dynamically by role in asp.net core razor pages
33 Views Asked by tzviya At
0
There are 0 best solutions below
Related Questions in ASP.NET-CORE
- Windows environment variables at appsettings.json
- Which approach is right while creating a service for your update method?
- New Blazor Web App, Password Reset "A valid antiforgery token was not provided"
- No webpage was found for the web address: https://localhost:7002/Category/Add?area=Admin. Why is my URL generated like ?area=Admin instead of /Admin/
- how to get the html for a tag helper in code
- How to share authorization implemented in the server project with the client project in Blazor Web App Auto project?
- Why https is disabled on publish in .NET Core 7.0
- How to set language in a server-side rendering blazor app
- How can I debug server side rendering blazor code in a component?
- ASP.NET Core 6 randomly returning 200 with empty response
- ASP.NET Core MVC : NullReferenceException: Object reference not set to an instance of an object
- ASP.NET Core Identity Custom Register Endpoint
- VS Community 2022 cannot install dotnet-ef when i try to publish
- How does ASP.NET Core Identity ensure username is unique under concurrent conditions?
- In clean architecture, is the presentation layer allowed to communicate directly with the infrastructure layer?
Related Questions in SESSION
- Multiple Processes, Multiple Processors, Single Priority Queue - Java Thread-Safe and Concurrency -
- Securing routes with sessionStorage in NextJS
- Cant handle Session's cookie when Safari/iOS
- Quart_Sessions Redis deletes keys and create backups instead
- I cannot get ID from session in GET method in Next.js 14
- I am new to flutter, just trying to set and get logged in user's session but maybe I am missing something
- I'm going nuts with Heroku session management issues
- Have a problem with get session in nextjs
- Session custom property getting undefined when calling Node js API from Javascript fetch
- Best Approach for Preserving User Input Across Blazor Pages in ASP.NET Core Application with User-Specific Data Storage
- spring security + form login + redis session storage -> keep coming out anonymous User
- Check user login in backend
- Next.js Middleware for Session Authentication Redirects: Errors Encountered
- Ansible prompt "No existing session" in manual executing the playbook
- Running a program on different computers with different users that access a central database simultaneously - VB.NET XAMPP/MySQL
Related Questions in RAZOR-PAGES
- When sanitize/encode while implementing tags system like on SO
- How to Pass Parameter Value From DDL to Filtering Query
- How to send a complex object to a Razor page
- Razor.RuntimeCompilation creates an error
- Runtime Compilation of Razor Pages Does Not Work .NET 8 VS2022
- C# ASP.NET Core MVC application with Avro
- How to add .html to razor pages url?
- BindProperty returning NULL OnPost
- How to perform code first approach on visual studio 2022 in MacBook m1
- Publishing .Net Core Blazor Web Assembly Client-Server Project
- Bug "The ConnectionString property has not been initialized." when use Update-Database in Package Manager Console
- How to get values in Razor View ASP NET CORE 6
- What is the correct syntax to bind a list of objects containing additional (nested) lists when posting forms
- Unable to Debug OnGet() Method in Razor Pages - ASP.NET Core
- Cannot post IEnumerable data in .NET Core Web Application
Related Questions in USERMANAGER
- Setting up asp.net Razor page UserManager for Dependency Injection
- Django, MyPy: Incompatible types in assignment (UserManager)
- .Net 7 UserManager.FindByEmailAsync errors with Unable to cast object of type 'System.String' to type 'System.Guid'
- Using UpdateAsync method of UserManager throws InvalidOperationException on EntityFrameworkCore
- How to guarantee the code mutual exclusive access in async method (no Monitor.Enter/Exit is allowed)
- Getting error when trying to run application related to UserManager, IdentityRole etc
- ASP.NET Core usermanger is not saving user roles to AspNetUserRoles table
- Usermanager, invalid token
- How to use ASP.NET Core Identity UserManager<ApplicationUser> through static method to get Identity User data from DB
- change session length dynamically by role in asp.net core razor pages
- How can I avoid fetching my user 2 times in this controller method?
- Whats the difference between fetching values from ClaimsPrincipal vs UserManager and which is faster?
- how to tell dotnet core version 7 UserManager to update it's security certificate to a new key
- `UserManager.AddClaimAsync` keeps throwing duplicate PK exception for new claims
- Install app restriction on some part of work profile
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?