spyder1329
spyder1329

Reputation: 745

How and where is returnUrl set, can it be overridden?

I've been looking into .NET CORE MVC and I keep seeing returnUrl referenced as a parameter in controller GET methods. I'd like to understand how and where this value is set because right now it appears to be a product of fairy dust.

Any help in understanding this portion of the framework would be appreciated.

...and are there any other system type parameters that can be referenced as a parameter, if so is there a list somewhere and can you override how this logic behaves?

Upvotes: 1

Views: 793

Answers (1)

Tom John
Tom John

Reputation: 784

With MVC if you hit an action that required authorization and your request is not authorized (or have the correct role) the browser is redirected to the specified login page (web.config) with the returnUrl as a parameter so that you can redirect the user to the original page once logged in.

Upvotes: 2

Related Questions