Monday, June 16, 2008

Using IIS 7.0 Applications

You can configure Web sites to run several different types of applications, including:

Common Gateway Interface (CGI) programs.

Internet Server Application Programming Interface (ISAPI) applications.

ASP.NET applications using managed code.

CGI describes how programs specified in Web addresses, also known as gateway scripts, pass information to Web servers. Gateway scripts pass information to servers through environment variables that capture user input in forms in addition to information about users submitting information. In IIS 7.0, standard CGI is implemented through the CgiModule and multi-threaded CGI is implemented through the FastCgiModule. The CgiModule has a managed handler that specifies that all files with the .exe extension are to be handled as CGI programs.

The way CGI programs are handled is determined by the way you've configured the CGI feature within IIS. By default, CGI is disabled. When you enable CGI, the CgiModule is the default handler for .exe programs. You can modify the handler configuration for .exe programs to use the FastCgiModule. This configuration is useful if you've installed the PHP Hypertext Preprocessor (PHP) on your IIS server and want to use it. Once you've configured the server to use FastCgi for .exe programs, you should add handler mappings for PHP-related file extensions and configure these mappings so that they use the PHP executable, such as Php-cgi.exe. For example, you could add mappings for *.php and *.php5. Your IIS server would then process files with the .PHP and .PHP5 extensions through Php-cgi.exe.

In IIS 7.0, ISAPI is implemented using two modules, IsapiModule and IsapiFilterModule. The IsapiModule makes it possible to use ISAPI applications and ISAPI extensions. In the IIS server core, several components rely on handlers that are based on ISAPI extensions, including ASP and ASP.NET. The IsapiModule has a managed handler that specifies that all files with the .dll extension are to be handled as ISAPI extensions. If you remove this module, ISAPI extensions mapped as handlers or explicitly called as ISAPI extensions won't work anymore.

IIS uses ISAPI filters to provide additional functionality. If you selected ASP.NET during initial configuration, an ASP.NET filter is configured to provide classic functionality through aspnet_filter.dll, an ISAPI filter. For classic ASP.NET functionality, each version of ASP.NET installed on a Web server must have a filter definition that identifies the version and path to the related filter. After you install new versions of ASP.NET, you can add definitions for the related filter.

ISAPI and CGI restrictions control the allowed ISAPI and CGI functionality on a server. When you want to use an ISAPI or CGI application, you must specifically allow the related DLL or EXE to run.

*.* Source of Information : Microsoft Press Internet Information Services (IIS) 7.0 Administrator's Pocket Consultant

No comments: