MVC Windows Authentication Redirection

I have a MVC 5 web application that should use Windows Authentication only. The issue I ran into was... after windows authenticated, I would like to redirect user to an action "AfterWindowsAuthenticated" (below) where It checks to see if user is NOT in my DB, then redirect to Create action where user needs to enter additional information like name, etc. and save to my application DB first. I don't know where to configure that direction.

public ActionResult AfterWindowsAuthenticated() { if (!string.IsNullOrEmpty(User.Identity.Name)) { if( not in the db) return RedirectToAction("Create", "SomeController", null); else return RedirectToAction("SomeAction", "SomeController", null); } return View("someview"); }

Thank you!

Category:windows Views:146 Time:2016-08-15

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.661 (s). 11 q(s)