make automatic login .net mvc to aspx

Dec 21 2018 12:52 PM
I have a system of N layers working perfectly, for things the client asked us, that we added a layer that allows the login with adfs, which was already implemented successfully, now I have a problem, and once I receive the claims and I read it I need I now create a user on my system but I want to do it automatically as soon as I log in with adfs in mvc adfs layer.
 
The adfs project opens by a different localhost to the web layer, which is where I want to authenticate automatically
 
Name Solution:
Business layer:
Data layer:
Data Access layer:
Web layer: where are all the web aspx: this layer opens by an http: // localhost: 22758 / Default.aspx in iis
 
I added a fourth mvc .net layer that is the one that receives the authentication Ad fs
 
the system before adding the layers works with a session id and with own users, my idea was to add once receive the adfs claims and that it is valid to create a user within the current system,
 
but I am presented with a problem, when I want to redirect to the other layer so that I add the user I can not pass through the parameters
 
this tries on the adfs mvc layer: it opens in an https: // localhost: 44386
  1. public ActionResult Index ()  
  2. {  
  3. UserManagerBusiness managerUserBusiness = new UserManagerBusiness ();  
  4. Contingency contingency = new Contingency ();  
  5. Users Users = new Users ();  
  6. string login = "Admin2";  
  7. string clave = "xxxxx";  
  8. //Users = User-Manager-Business.ValidationUser (login, password, out contingency);  
  9. // data.Page_LoadComplete ();  
  10. // ViewBag.data = layer;   
  11. object data;  
  12. return Redirect ("http: // localhost: 22758 / Default.aspx");  
  13. // return View ();  
  14. }  
I wanted to see if I called an ajax but I do not handle much with that in .net ..
 
I clarify in the layer of the adfs I have everything perfect. I would like after authenticating in adfs to be able to give him credentials automatically I know it's silly but I'm stuck
 
I would appreciate any help

Answers (1)