Click here to Skip to main content
13,768,883 members
   

ASP.NET

 
QuestionCustom Tablix Sort Order Z-A Pin
jkirkerx19-Oct-17 12:30
professionaljkirkerx19-Oct-17 12:30 
AnswerRe: Custom Tablix Sort Order Z-A Pin
jkirkerx19-Oct-17 12:38
professionaljkirkerx19-Oct-17 12:38 
QuestionMVC RedirectToRouteResult Help Pin
Foothill18-Oct-17 10:23
professionalFoothill18-Oct-17 10:23 
SuggestionRe: MVC RedirectToRouteResult Help Pin
Richard Deeming18-Oct-17 10:51
mvpRichard Deeming18-Oct-17 10:51 
GeneralRe: MVC RedirectToRouteResult Help Pin
Foothill19-Oct-17 4:23
professionalFoothill19-Oct-17 4:23 
GeneralRe: MVC RedirectToRouteResult Help Pin
Richard Deeming19-Oct-17 10:25
mvpRichard Deeming19-Oct-17 10:25 
GeneralRe: MVC RedirectToRouteResult Help Pin
Foothill19-Oct-17 11:58
professionalFoothill19-Oct-17 11:58 
GeneralRe: MVC RedirectToRouteResult Help Pin
Foothill19-Oct-17 5:44
professionalFoothill19-Oct-17 5:44 
Okay, so I have made some progress but I am running into a bit of trouble. On a lot of failures, I redirect the user to the login page but the page URL is not being populated so it tries to call my login action on whatever page its on resulting in an error.
// Login redirect handler
private ViewResult GetRedirectToLogin()
{
 ViewResult result = new ViewResult();

 result.ViewName = "~/Views/Login/Index.cshtml";
 result.MasterName = "~/Views/Shared/_loginlayout.cshtml";
 result.TempData = _context.Controller.TempData;

 return result;
}

This has been working. Any errors with authentication are caught and the user is redirected. The problem is that the browser still thinks its on the first page so that when I click my "Login" button the server looks for a [HttpPost]Login action and returns a 404 error.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016

GeneralRe: MVC RedirectToRouteResult Help Pin
Richard Deeming19-Oct-17 10:18
mvpRichard Deeming19-Oct-17 10:18 
PraiseRe: MVC RedirectToRouteResult Help Pin
Foothill19-Oct-17 11:59
professionalFoothill19-Oct-17 11:59 
QuestionPassword Reset works in debug environment but does not work after deployment Pin
Philip Hall16-Oct-17 7:50
memberPhilip Hall16-Oct-17 7:50 
AnswerRe: Password Reset works in debug environment but does not work after deployment Pin
A_Griffin18-Oct-17 22:49
memberA_Griffin18-Oct-17 22:49 
GeneralRe: Password Reset works in debug environment but does not work after deployment Pin
Philip Hall19-Oct-17 6:10
memberPhilip Hall19-Oct-17 6:10 
Generalcode for solving zero distortion tecniqueof image steganography Pin
Member 1346535714-Oct-17 10:43
memberMember 1346535714-Oct-17 10:43 
SuggestionRe: code for solving zero distortion tecniqueof image steganography Pin
Kornfeld Eliyahu Peter14-Oct-17 23:53
mvpKornfeld Eliyahu Peter14-Oct-17 23:53 
QuestionCode is inserting only one row of records. Any ideas? Pin
samflex9-Oct-17 6:16
membersamflex9-Oct-17 6:16 
AnswerRe: Code is inserting only one row of records. Any ideas? Pin
F-ES Sitecore11-Oct-17 1:54
mvpF-ES Sitecore11-Oct-17 1:54 
AnswerRe: Code is inserting only one row of records. Any ideas? Pin
ZurdoDev11-Oct-17 10:44
professionalZurdoDev11-Oct-17 10:44 
QuestionHave a form result invisible until submission? Pin
The Rarispy8-Oct-17 17:48
memberThe Rarispy8-Oct-17 17:48 
AnswerRe: Have a form result invisible until submission? Pin
Richard Deeming9-Oct-17 9:42
mvpRichard Deeming9-Oct-17 9:42 
QuestionChanging the text of a GridView buttonfield text dynamically Pin
holdorf7-Oct-17 16:10
memberholdorf7-Oct-17 16:10 
QuestionASP.Net Core and global.asax Pin
Mou_kol6-Oct-17 0:21
memberMou_kol6-Oct-17 0:21 
AnswerRe: ASP.Net Core and global.asax Pin
Afzaal Ahmad Zeeshan11-Oct-17 13:31
mvpAfzaal Ahmad Zeeshan11-Oct-17 13:31 
QuestionDesktop application "communicating" with ASP.NET Pin
The Junior5-Oct-17 0:02
memberThe Junior5-Oct-17 0:02 
AnswerRe: Desktop application "communicating" with ASP.NET Pin
Atlapure Ambrish5-Oct-17 5:04
professionalAtlapure Ambrish5-Oct-17 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.181117.1 | Last Updated 18 Nov 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid