dongzan9069 2013-11-18 21:36
浏览 61

PHP和ASP.NET之间在同一IIS服务器上的通信

We have the following setup:

-Windows 2008 R2 Standard.

-ASP.NET Web Application deployed on Microsoft IIS 7.5 Web Server.

-PHP Version 5.4.21 Non Threaded 32-bit version

-WISP (Windows, IIS, SQL Server/Express, and PHP) stack and an ASP.NET web application HTTPS ( SSL )

We will ultimately deploy an ASP.NET Web Application and a PHP Web Application on the Same IIS Server.

User will first log on to the ASP.NET Web Application, but we want the user to be able to navigate between the ASP.NET Web Application and the PHP Web Application back and forth with ease.

We are planning to implement REST-based Web Services on the ASP.NET Web Application side and PHP Application side.

The User login Framework is only on the ASP.NET Web Application side( for those familiar with ASP.NEt technologies, we are using ASP.NET Membership Framework).

As I mentioned before, User will first log on to the ASP.NET Web Application, but we want the user to be able to navigate between the ASP.NET Web Application and the PHP Web Application back and forth with ease.

Do we have to Reauthenticate the user whenever he/she navigates over from ASP.NET side to PHP side and vice versa?

Would it be reasonably secure enough to just pass over the login cookie( "Security token") when user navigates over from ASP.NET side to PHP side and vice versa?

Please feel free to suggest alternatives to the approach mentioned above( for example, some people told me to use Memcached technology to share session information between the ASP.NET Web Application and the PHP Web Application. Is Memcached Technology better than using Web Services? )

  • 写回答

1条回答 默认 最新

  • dongyan5641 2013-11-18 21:59
    关注

    I successfully implemented the exact same thing as you describe, but in the reverse direction. The users would authenticate on the PHP side (an existing legacy site), and we would just pickup the security token via cookie and just read against the same database to make sure the token was still valid. Worked without a problem for a site supporting several hundred regular users per day. In our case the PHP servers and the ASP.NET servers were actually even hosted in separate facilities.

    Note that the use of a cookie based security token (session token) is commonplace. You do not have to do anything extra to have your users browsers maintain and send you the token as long as the domain does not change from the browsers point of view, or you properly set the path for the cookies when you do your authentication.

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?