We want to integrate ADFS and Non ADFS authentication in MVC 4 application. RRS feed

  • Question

  • User-366017857 posted

    Hi Dear,

    We have already implemented ADFS configuration in one of my MVC 4 application and working fine, but know we are in situation where we need to implement NON ADFS authentication in application.

    How we can achieve this where ADFS authentication is already implemented and running and need NON ADFS (Normal login functionality) in application.

    How to identity and redirect to ADFS loging page or normal login page.


    Friday, February 5, 2016 7:10 AM

All replies

  • User1779161005 posted

    One approach is ti use a federation gateway like IdentityServer: https://github.com/IdentityServer/IdentityServer3/

    Friday, February 5, 2016 2:40 PM
  • User-366017857 posted

    Hi BrockAllen,

    I do have another solution is to check whether request is coming from Intranet or Internet environment so that I can show login pages respectively. 

    Do we have anything which identifies that from where request is coming Intranet or Internet.


    Tuesday, February 9, 2016 10:53 AM
  • User614698185 posted

    Hi Babasaheb,

    If you want to identify if a request comes from Internet or Intranet, you could check the IP address of a user. Like below:

    var clientIP = System.Web.HttpContext.Current.Request.UserHostAddress;
    bool isIntranetUser = clientIP.StartsWith("192.") || clientIP .StartsWith("172.") || 
                          clientIP.StartsWith("10.") || HttpRequest.Current.Request.IsLocal;

    Best Regards,

    Candice Zhou

    Monday, February 15, 2016 8:11 AM
  • User-366017857 posted

    Hi Candice,

    Thanks for reply but We know the IP address of hosting server only...don't any other series of IPs get used in different areas of world.

    Do we have any another way for it.



    Monday, April 4, 2016 5:55 AM