0

The question is if I can redirect from a MVC web App1 to a controller residing in a MVC web App2?

Using the same user credentials from MVC web App1 passed to mvc web App2

Regards, Jorge

Jorge M
  • 95
  • 1
  • 1
  • 8
  • What is authentication type? Is it possible to use target URL? – Alexander Jun 01 '17 at 01:37
  • in web.config I have Authentication=none – Jorge M Jun 01 '17 at 01:44
  • Why do you neet to send credentials while anonymous authentication is enabled? – Alexander Jun 01 '17 at 01:47
  • Because I have my custom authentication methods, I validate User/passs against my own user database using Owin mvc. I create a simple mvc app using the template authentication methods, I changed this to validate against this own database exluding tables like Asp.Users that come by default with entity framework. So I have to Authenticate in this site and then redirect to another action/ controller that resides in other site that implements the same authentication policies. – Jorge M Jun 01 '17 at 01:59
  • Did you try to use cookies? You could send a cookie with some public key from first app and read this in another after redirection. See also [the post](https://stackoverflow.com/a/3804387/7914637) about sessions. – Alexander Jun 01 '17 at 02:57

1 Answers1

-2

It is possible with simple logic you just pass data into query string. e.g.
<a href="application-2/ControllerName/userName/password"> Move To Next App</a>
or you may use
<a href="application-2/ControllerName?username=Value&Password=Value">Move To Next App"</a> if you don't want to show your password use some encryption to encode username password

rtraees
  • 312
  • 2
  • 15