Working with CGI

Last and definitely least, you can also install and configure CGI applications (whether scripts or executables) on IIS 6, although this is not recommended due to the performance overhead involved. About the only time you’d want to use this feature is if you have legacy UNIX apps that you can recompile for the Windows platform but don’t have the time or resources to rewrite as ISAPI extensions or ASP/ASP.NET applications. Here are a few tips on how to deploy CGI apps on IIS:

  • Put all your CGI apps for a given site in a separate subdirectory. The usual name for such a directory on UNIX platforms is \cgi-bin—but you don’t have to use this name, you can use anything you like. The point is that it’s safer to segregate your CGI scripts and executables from your static HTML content, especially if you have executable (.exe) CGI apps and not just scripts.

  • If your CGI apps are executables (.exe), give the \cgi-bin directory Scripts And Executables as their execute permission on the Directory tab of the \cgi-bin properties sheet. If your apps are scripts  (for example, .pl for Perl scripts), instead give the \cgi-bin directory Scripts Only permission and make sure you have installed and properly configured the necessary script engine (for example,  perl.exe) and set up the appropriate application mappings, making sure that you select the Script Engine check box on the Application Extension Mapping dialog box for the CGI extension you’re using (such as .pl).

  • Don’t forget to enable your CGI extensions using WSE if you want your CGI applications to run. You can do this either by manually adding the appropriate extension to the WSE screen or by allowing all CGI extensions to run—I’ll discuss the difference in Chapter 10.

start sidebar
Challenge

You plan to deploy an e-commerce application on IIS that will accept orders and process them. Which application architecture would you use to develop your application: ASP, ASP.NET, ISAPI, or CGI? Explain the reasons behind your choice. Would you run IIS in worker process isolation mode or IIS 5 isolation mode? What is the advantage of the mode you would choose? What special features of IIS 6 would make this a better platform for deploying your app than earlier versions of IIS?

end sidebar




IIS 6 Administration
IIS 6 Administration
ISBN: 0072194855
EAN: 2147483647
Year: 2003
Pages: 131
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net