Can PHP and ASP.Net run together within the same web site in IIS 7.5? Can PHP and ASP.Net run together within the same web site in IIS 7.5? asp.net asp.net

Can PHP and ASP.Net run together within the same web site in IIS 7.5?


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.


Yes you can use both under the same website. Since the file extensions are mapped to specific external processes, they are called independently. You can even use Asp.Net to secure .php files with FormsAuthentication by implementing wildcard mappings within IIS (I know 6/7 have this, not sure about 5). Mixing data across them is tricky because they will have separate external processes and thus separate sessions. Most cookies will be readable across both, but secured cookies will not be.


Yes you can, but watch out for this:

If you have a wordpress on your "root", and asp.net apps in folders under it

(e.g. http://root.com/aspnetapp1/), and if you follow these suggestions about "urlrewrite" for permalinks in wordpress, you can have trouble if you try to configure "wildcard handlers" in the apsnetapp1.

To avoid issues, the web.config of the wordpress root app must also have that setting:

    <location path="." inheritInChildApplications="false">     <system.webServer>...    </system.webServer></location>

Or else, your wildcard handler will never raise because index.php from root will catch all your requests to url like: http://root.com/aspnetapp1/api/*