Pass .NET Forms Authentication off to PHP app on different server

Last post 05-08-2007 1:53 PM by mori0043. 4 replies.

Sort Posts:

  • Pass .NET Forms Authentication off to PHP app on different server

    03-26-2007, 4:47 PM
    • Loading...
    • amandalynn
    • Joined on 11-11-2005, 9:31 PM
    • nashville
    • Posts 3

    I have done some research on this, and haven't found a clear answer.

    What is the best method to pass authentication from a .NET web app to a different server that contains a PHP application.

    I have some ideas regarding using the cookie (although I haven't explored this too deeply), but deep down it feels like a hack, and I don't even know if it would be possibly to decipher this cookie data. And I can't quite wrap my head around how this would expire.

    Any thoughts? has anyone run into this before?

    Thanks

  • Re: Pass .NET Forms Authentication off to PHP app on different server

    03-27-2007, 8:57 AM
    • Loading...
    • Xanderno
    • Joined on 06-17-2002, 3:24 PM
    • Plano, TX
    • Posts 1,179
    That's a possibility, as long as you know the key that's being used to encrypt the forms authentication ticket and more importantly, as long as the PHP app is on the same root domain as the ASP.Net application.   If they're on different domains, you're going to have to look to a solution other than cookies. 
  • Re: Pass .NET Forms Authentication off to PHP app on different server

    03-27-2007, 9:31 AM
    • Loading...
    • amandalynn
    • Joined on 11-11-2005, 9:31 PM
    • nashville
    • Posts 3

    What are the opinions on the best way to accomplish this?

    Would a SOAP Webservice be the best approach?

    PHP app is hosted on a Linux box. Everything else is on Windows.

     

  • Re: Pass .NET Forms Authentication off to PHP app on different server

    03-29-2007, 5:23 AM
    Answer

    Hi amandalynn

    I'd liked to share some ideas and put them to the test.

    Step 1: User go to a .NET web site, Sign in.

    Step 2: Get the SessionID (For example: sessionid=ffj12d455p0ujr45vdqwhh45) and store in DB (For example,DataBaseName=SQLDB)

    Step 3: Redirect to a PHP web site by link http://phpsite/default.jsp?sessionid=ffj12d455p0ujr45vdqwhh45

    Step 4: Get sessionid in PHP web site, verify the sessionid in your SQLDB,

    Step 5: If user is offline, please remove the sessionid from SQLDB.

    If you wish, find the article about how to Share Session State on MSDN Library

    Following the link below, Hope it helps

    http://msdn2.microsoft.com/en-us/library/aa479313.aspx

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Pass .NET Forms Authentication off to PHP app on different server

    05-08-2007, 1:53 PM
    • Loading...
    • mori0043
    • Joined on 05-26-2006, 2:01 PM
    • Posts 61

    Hi XiaoYong Dai, I have been doing a lot of research on this model and it seems the best one that I have seen so far. I am going to implement this model here on my site. I am wondering what security issues that I should consider when using this method.

    Thanks in advance...

Page 1 of 1 (5 items)
Microsoft Communities
Page view counter