A portion of our site is done in PHP and a portion of our site is done in ASP.Net. We just set up a new web server with Windows Server 2008 R2 which has IIS 7.5 installed.

I understand that IIS 7+ supports PHP, but can PHP and ASP.Net run side-by-side within a single web site in IIS, or would I have to set up one web site for the PHP pages and one web site for the ASP.Net pages?


It should be possible to use both handlers, but you'll probably need to use explicit extensions e.g. .aspx and .php.

Written by tomasmcguinness

Can you elaborate on what you mean by using explicit extensions?

Written by Aaron

Accepted Answer

You should be able to run both in the same site, but be sure that the AppPool for the site runs a "classic" ASP.NET pool configuration. The default AppPool routes everything through ASP.NET, and you won't want that for your PHP pages.

Other than that, you should be fine. Query strings, files, and back-end databases will be the best way to share data between pages.

Written by Cylon Cat
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki