How to easily mix ASP.NET and PHP web applications

I have two websites, one is powered by ASP.NET and the other is powered by PHP. The PHP site is hosted on a relatively inexpensive host provider ("unlimited bandwidth and disk space for $ 10 a month"). The PHP site also provides REST URLs to help me monetize my site.

The other site (kind of "master", kind of) is an ASP.NET web site with a login mechanism. My goal is to allow users to login to my ASP.NET site and then redirect to the PHP server. Is there a simple and workable solution that accomplishes this?

I have several questions regarding this approach:

How can I pass session information and variables from an ASP.NET application to a PHP based application to ease the "Single Sign On" aura?

Can a "plain" cookie handle this scenario? Or do I need to use encrypted query strings?

These sites do not contain sensitive data, so protecting user data is not a top priority. The site was built "for fun".

Are there hosts that allow subdomains to be hosted on a different language platform than the main domain? If I had www.example.com hosted on an ASP.NET server, could I have a subdomain (forum.example.com) hosted on a PHP server? Is it possible?

Any help on this is greatly appreciated.

0


source to share


3 answers


Although more complex, I would go with the same methodology as the OpenID specification and use the Diffie-Hellman exchange. This allows two parties, without prior trust, to establish trust over a period of time.

PHP Info



Info for VB.NET

+1


source


I would go for a cookie if both sites are on the same domain. One of the advantages of cookies over encrypted strings is that they are automatically passed between requests and you don't have to think about them when creating your URLs. One of the disadvantages of cookies is that users can be disabled by users.



0


source


Store sessions in a database and create / use a session type that is cross platform. You can do it yourself. But you should be aware that passing sessions, etc. Between different languages ​​like this can be dangerous (safe)

0


source







All Articles