Q

Putting a menu bar at the top of every page

I am trying to find a way to get IIS 5 to put a small menu bar at the top of every page I host on the server. I would like to avoid using frames so hosted sites can view their paths and users can bookmark pages. It would be preferable if the server could do this transparently...inserting the code on every page just below the body tags, and presto it's done. So far, I am unable to do this without using a frame setup. It's not too good for business if no paths are displayed and no users can bookmark favorite pages.
There's nothing built into IIS to provide this. So, you'll need to either write or buy an application. The best way to do this would be to create an ISAPI filter, because ISAPI filters have the capability to modify requests and responses without necessarily interfering with the normal file processing. Here's Microsoft's information on creating custom ISAPI filters:
http://msdn.microsoft.com/library/en-us/iissdk/iis/creating_isapi_filters.asp.

Writing ISAPI filters is hard, though, even for experienced developers. An easier approach would be to create a Perl script that was capable of reading an HTML file, replacing the "<body>" tag with "<body>your_html". This could be a very short script; just a few lines. Then, in IIS extension mapping, map all common HTML file extensions (.htm, .html) to your Perl script. IIS will call the Perl script, pass the path to the requested file as an argument, and send the Perl output back to the Web browser.

I wish I could point you to a download of an existing tool that would do this for you, but I can't find one.
This was first published in May 2004

Dig deeper on Windows Operating System Management

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close