How do I call the following from within the Login action of the Account controller?
return View("~/Views/Shared/MyView.cshtml");
When I do I am just returned to "/Account/Login" instead of going to "MyView".
My Login action calls out to an external web service to see if a user is valid (my app doesn't hold the login data. Another app holds it). If the external web service authenticates the user's username and password, it returns a profile object for the user. I want to pass that user profile object to my next app view. I'd use RedirectToAction but I don't see a way to pass the profile data through that. I'm thinking maybe I can just return my next view direclty if I make it shared. I could pass a model to that.
Am I thinking of this the wrong way?
UPDATE:
It's been suggested in comments that what I really want is RedirectToAction(). But what I'm reading suggests this will not work either.
What I'm really after is typed, complex object data accessible from my next app view (after user authentication). "Complex" is the key word here. What I get back after user authentication is a profile object that contains numerous lists (not just simple properties). According to what I'm reading, passing such nested list data from controller to view is just not built into the MVC framework. It's just not an intended use. What views want from controllers is a set of simple properties. Here's a quote from a response to a similar post:
"Internally the RedirectToAction() method builds a RouteValueDictionary by using the .ToString() value of each property in the model. However, binding will only work if all the properties in the model are simple properties and it fails if any properties are complex objects or collections because the method does not use recursion."
I'm thinking I've got to be wrong in my assertion above. It's too sophisticated a technology for this to be the case. I'm just missing something obvious. Can somebody give me some idea of how to accomplish what I'm after here?