2

I have 3 MVC Web applications: 1 for Managing user Logins and other 2 are separate applications for different tasks. If a user logined in application 1 he can able to access the 2 other applications with the same credential. I am using standard MVC authentication here. It works in localhost, but not working after hosting in IIS. The applications 2 and 3 are redirected to the login screen even if the user logined.

This is a image of the infrastructure:

Check Image

Community
  • 1
  • 1
  • Might need to elaborate on "standard" authentication here. Forms authentication? Windows authentication? – Mitch Feb 08 '18 at 07:35
  • Thank you for the response. It is Form authentication – Aravind C S Feb 08 '18 at 07:39
  • It creates a cookie called ".ASPXAUTH". You could try capturing the contents of that cookie and forwarding it on. Not guaranteed to work though. You may need to consider OAuth based authentication. – Mitch Feb 08 '18 at 07:43
  • I am changed other two application to Windows Auth mode in IIS then it works and Both .ASPXAUTH values are equal. But – Aravind C S Feb 08 '18 at 08:33
  • 2
    See [Single sign on using same application but multiple domains ASP.NET MVC](https://stackoverflow.com/a/11334301/), [How to do Single Sign On for multiple MVC 4 web applications on IIS 7.5](https://stackoverflow.com/a/23627817/), and [C# ASP.NET Single Sign-On Implementation](https://stackoverflow.com/a/14309354/). – NightOwl888 Feb 09 '18 at 03:44
  • Yah Thank you Boss – Aravind C S Feb 09 '18 at 13:52

1 Answers1

0

The application share the same session, without modifying the cookie

You can make the following values same for each application

  • Same Machine key
  • Same Session storage i.e. OutProc
  • same application name

Change configuration using web.config

Ashish Shukla
  • 1,239
  • 12
  • 23