I was reviewing some ASP.NET MVC
code, specifically a web.config file.
I noticed this in the appSettings
section:
<add key="PreserveLoginUrl" value="true" />
cheers!
ASP.NET MVC configuration In ASP.NET apps, configuration uses the built-in . NET configuration files, web. config in the app folder and machine. config on the server.
In MVC project you will find two web. config files - One in root path and another in Views folder. Let's see one by one about these files with its uses in MVC application.
ASP.NET MVC Form is the most important and essential thing that most programmers learn. ASP.NET MVC Form is one of the components in the MVC Framework which is suggested to work with Forms. MVC is divided into three ways which focused on the separation of concerns.
From the MVC 4 Whitepaper:
When WebMatrix.WebData.dll is included in in the /bin directory of an ASP.NET MVC 4 apps, it takes over the URL for forms authentication. Adding the WebMatrix.WebData.dll assembly to your application (for example, by selecting "ASP.NET Web Pages with Razor Syntax" when using the Add Deployable Dependencies dialog) will override the authentication login redirect to /account/logon rather than /account/login as expected by the default ASP.NET MVC Account Controller. To prevent this behavior and use the URL specified already in the authentication section of web.config, you can add an appSetting called PreserveLoginUrl and set it to true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With