To do so, just run the commend aspnet_regiis and it handles everything behind the scenes including adding a mime type of ASPX type to IIS so that it will be able to interpret it.
Thank you Microsoft for providing an easy way to install PHP on IIS. Back then I used to do it manually: download files from the PHP site, move some DLL files to the System32 folder, configure some configuration files and so many more. If you are no techie, you will definitely have a hard time making this work.
However, after dabbling with PHP again and having to make this run under the IIS server, I recently found out that Microsoft has provided a way for anybody to install PHP on IIS on the fly. You just need a few clicks and it does the rest for you.
The fastest and easiest way to install PHP on IIS is using Microsoft’s Web Platform installer. It completely automates setting up IIS, FastCGI and the latest version of PHP from the php.net site. To get started, just click the button below.
For step-by-step instructions on how to install PHP on IIS6 (Windows 2003) with the new Microsoft FastCGI module, see Configuring FastCGI Extension for IIS 6.0.
For step-by-step instructions on how to install PHP on IIS7 (Windows Vista SP1 and Windows 2008) see, Using FastCGI to Host PHP Applications on IIS 7.0