stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


HttpHandlers and the IIS Metabase







HttpHandlers and the IIS Metabase

HttpHandlers and the IIS Metabase 03/13/2003 10:14 AM

Our team has recently consolidated a bunch of intranet sites housed on various team members' machines into subwebs on a larger server.  I had been hosting one of the sites from my office, and needed a way to redirect all hyperlinks to that particular subweb to a new subweb without affecting the rest of the sites on the machine.  ASP.NET provides a rather simple way of doing this:

using System.Web;

namespace Forward {
  public class Forwarder : IHttpHandler
  {

  public Forwarder(){}

  public void ProcessRequest(HttpContext context)
  {

  string subWeb = "http://mymachine/subweb";
  string oldWeb = "http://newmachine/newsubweb";

  HttpRequest request = context.Request;
  HttpResponse response = context.Response;
 
  string newUrl = request.Url.AbsoluteUri.Replace(subWeb,newWeb);
  response.Redirect(newUrl);
  }

  public bool IsReusable
  {
  get { return false; }
  }
  }
  }

compiled as forward.dll and placed in the subweb's bin/ directory, with the following added to the Web.config:

<httpHandlers>
<add verb="*" path="*" type="Forward.Forwarder, Forward" />
</httpHandlers>

Funny enough, this only worked for paths like http://mymachine/subweb/foo.as px, since paths like http://mymachine/subweb/foo.htm were routed directly to the filesystem by IIS and bypassed ASP.NET.  I remembered having this problem before, when .NET was still in development, and the trick was to associate the "*" file extension with ASP.NET in the script map.  Too bad IIS no longer stores the script map in the registry where it's easy to mess with.

A bit of searching and I found:

http://suppor t.microsoft.com/default.aspx?scid=KB;en-us;q232068#3

I just had to use MetaEdit to find LM/W3SVC/1/ROOT/ScriptMaps and add:

*,C:\WINDOWS\Microsoft.NET\Framework\v1.2.x86dbg\aspnet_isa pi.dll,1

and everything is working great now.

 

 




This is a GrokNews Entry: (what is grok?)





Similar Items

HttpHandlers and the IIS Metabase

Grok Headline matches for HttpHandlers and the IIS Metabase

More HttpHandlers


More HttpHandlers 03/13/2003 10:14 AM

Richard Birkby pointed me to his URL rewriting code, similar to Apache's mod_rewrite.  It's a clever piece of code, and also works with the metabase hack I described (to get * mapped rather than .* or .).  The comments in the article led me to an ISAPI rewriter, and a rather creative hack that involves ov erriding the behavior of the 404 redirect page.

My little handler is working fine, but I could have saved myself a bunch of time by checking CodeProject.com first.


Metabase Errors


Metabase Errors 06/25/2004 02:28 AM

Backing up the IIS Metabase


Backing up the IIS Metabase 06/30/2004 12:59 AM

Metabase 2004.09.02


Metabase 2004.09.02 09/02/2004 11:24 PM
A DBMS-independent package to access and manage databases with PHP.

Metabase 2005.01.05


Metabase 2005.01.05 01/06/2005 04:50 AM
A DBMS-independent package to access and manage databases with PHP.

Backing Up the IIS Metabase Using VB
Script


Backing Up the IIS Metabase Using VB
Script
09/04/2004 06:47 AM

Released Metabase greatly improved


Released Metabase greatly improved 01/16/2003 03:04 AM
Metabase is a popular PHP database abstraction package that lets developers write portable database applications. This means that Metabase makes it possible to write database applications that do not need to be changed to work with different databases. Currently, Metastorage generates the code of persistence layer APIs that is based on Metabase. The latest improvements in Metabase make it possible for Metastorage to generate more compact persistence APIs.
Grok Description matches for HttpHandlers and the IIS Metabase
GrokA matches for HttpHandlers and the IIS Metabase

Access 2003/2002 Sample: Using
Parameters with Queries and Reports
Sample Database


Access 2003/2002 Sample: Using
Parameters with Queries and Reports
Sample Database
04/20/2004 12:25 AM
This sample Microsoft Access database provides example forms, queries, and reports that demonstrate using query parameters, as well as using a custom form to supply parameters to a query or report.

Visio 2003 Sample: 20 Sample Diagrams


Visio 2003 Sample: 20 Sample Diagrams 08/29/2004 11:34 PM
This download includes 20 sample Visio 2003 diagrams related to support and sales demos.

Sample Page From Doug Wheatley


Sample Page From Doug Wheatley 05/09/2004 03:16 AM
You saw his artwork in "Darklighter," and next year you'll see him illustrate the Episode III comic adaptation, now artist Doug Wheatley shares a gorgeous sample page of fully painted comic art, courtesy of the Dark Horse Comics message boards. While the sequence is inspired from Episode II, this page gives fans an idea of what the adaptation will look like. Start drooling now.

Office 2003: Adding an ActiveX Control
to a Smart Document Sample


Office 2003: Adding an ActiveX Control
to a Smart Document Sample
12/03/2003 12:40 AM
Use this Visual Studio .NET sample in conjunction with the article, "Adding an ActiveX Control to a Smart Document" available on MSDN to learn how to embed a calendar control into the task pane of a smart document. This sample contains the project files and sample code for this task as well as supporting files. To use this sample, see the article, listed in the related links box.

Wx-Sample-XS-0.01


Wx-Sample-XS-0.01 03/14/2003 06:16 PM

FCC to Sample TV a la Carte


FCC to Sample TV a la Carte 07/29/2004 05:01 AM
The battle over roll-your-own cable moves to the FCC, which is due to write a report that will carry a lot of weight in Congress. Michael Grebb reports from Washington.

"Get a license or do not sample"


"Get a license or do not sample" 09/09/2004 09:02 AM
So ordered the 6th Circuit Court of Appeals. Sampling, we're told, is piracy. But be certain to see the 19 footnotes in this relatively brief opinion, or the 28 separate quotes the opinion includes from other peoples work. I assume the court got a license for those. Now that's not quite fair. The court's decision turns upon its "literal" reading of the sound recording statute. The sound recording statute has no de minimus exceptions, the court held. So while you are free to copy three notes from a musical composition, you can't copy the same three notes from a recording. So copying (so long as de minimus) is fine; cut & paste is not. It is a "bright-line" rule the Court has crafted: Ask permission first. (And don't worry, they might have added. It's simple.) So once again: life in the analog world is freer than life in the digital world. You can do it, just don't use technology to do it -- unless, of course, your lawyer has spoken to their lawyer.

Get Off Your Dead Ass and Sample!


Get Off Your Dead Ass and Sample! 09/25/2004 12:14 AM
Three Notes and Runnin' has decided to protest the recent court decision that cited N.W.A. with illegally sampling a snippet of Funkadelic's Get Off Your Ass and Jam that had been modified to the point of unrecognizability. So in the tradition of online civil disobedience such as Grey Tuesday, Downhill Battle has issued a challenge to sample-based artists to create 30-second remixes that consist of nothing but the disputed 1.5-second Funkadelic sample.

Sample the Future


Sample the Future 12/28/2004 06:52 PM
Music released under the Creative Commons license? What of the world is this? According to Wired, it looks like this could potentially become thing quite big. I wonder of the established music industry is concerned about this….

Direct and Related Links for 'Sample the Future'


DVD Playback Sample


DVD Playback Sample 09/10/2004 01:57 AM
DirectShow C++ sample application for DVD Playback

Update: Sample Manager 1.4


Update: Sample Manager 1.4 08/31/2004 06:11 AM
The batch audio processor adds "serious speed and memory improvements," plus other changes.

Rip. Sample. Mash. Countdown.


Rip. Sample. Mash. Countdown. 02/01/2005 08:39 PM

Since we noticed sta(cc)ato another CC radio show has started: The Revolution. After three regular shows, the Revolution is already producing a special: Rip. Sample. Mash. Countdown. Each week until the Freestyle Mix and Militia Mix contests end (February 12), the Revolution will play new entries that have been rated four stars (of five) or higher by the CC Mixter community.

Listen now.


Update: Sample Manager 1.3


Update: Sample Manager 1.3 07/15/2004 10:13 AM
The batch audio processor adds processing with multiple audio units, saving and recalling lists of files, Mix, Crop, improved Fade controls, and other changes.

New Sample of PHP Documentation "New CHM
Edition"


New Sample of PHP Documentation "New CHM
Edition"
07/04/2002 05:29 PM
The 6th sample of the CHM edition is out now. This sample is mainly and content update, but it also fixes some small bugs. We welcome any suggestions and bug reports. Try out the new CHM Edition, and please send us your feedback to our dedicated mailing list.

Infineon to sample DDR 3 'in 2006'


Infineon to sample DDR 3 'in 2006' 04/13/2005 09:22 AM
After Samsung

DigitalGlobe | Sample Imagery


DigitalGlobe | Sample Imagery 12/29/2004 06:36 PM
Digital Globe's high resolution satellite imagery .. Sat-map images of before and after .. even the great tsunamis .. Here’s

digitalglobe.com/sample_imagery.shtml
track this site | 6 links


iLog Sample Machine


iLog Sample Machine 04/12/2005 11:31 AM

ilog.jpgThe iLog is a second-generation electronic music device from Owl Project. With a series of touch-sensitive knobs and switches (aren't all they all?), the iLog lets you record samples and loop them from one easy, woodland device. It's a personal project, though, not something mass-produced, so just look and love. It does make me wonder, though: how hard would it be to mill a super-thin wooden veneer for the back of an iPod? Wood would be so much better than smudgy metal.

Proj ect Page [OwlProject via WMMNA< /a>]


sample a random bl0g


sample a random bl0g 12/24/2004 01:08 PM

blogger.com/redirect/next_blog.pyra?navBar=true
track this site | 3 links


Cop Uses Taser Gun On Man Who Refused
Urine Sample


Cop Uses Taser Gun On Man Who Refused
Urine Sample
04/02/2005 11:22 AM
Free Internet Press Apr 2 2005 1:55PM GMT

Northwind and pubs Sample Databases


Northwind and pubs Sample Databases 04/09/2004 03:57 PM
New scripts for creating the Northwind and pubs sample databases for use with SQL Server 2000 and MSDE 2000. The scripts have been updated to remove the guest account to improve security. The pubs installation script has been updated to include all of the data for the database, eliminating the requirement to run separate jobs to add data after creating pubs.

VIA to sample PCI Express P4 chipset in
January


VIA to sample PCI Express P4 chipset in
January
12/09/2003 06:14 AM

SiS, VIA to sample PCI Express chipsets
next month


SiS, VIA to sample PCI Express chipsets
next month
12/09/2003 09:45 AM
End-user products in Q2?

O'Reilly: PHP Cookbook Sample Chapter


O'Reilly: PHP Cookbook Sample Chapter 10/15/2002 07:15 AM

WS-I releases Web services application
sample


WS-I releases Web services application
sample
12/10/2003 01:55 PM

Sample Chapters of New Mozilla Books


Sample Chapters of New Mozilla Books 04/07/2005 03:48 PM

Building the RSS Watch Sample
Application


Building the RSS Watch Sample
Application
08/22/2004 09:08 PM
Monitor RSS feeds automatically and learn about CFCs and XML at the same time.

MSF Sample Project Lifecycle
Deliverables


MSF Sample Project Lifecycle
Deliverables
04/12/2004 11:20 PM
These sample templates help MSF practioners by providing project lifecycle deliverables. Note: These are provided as-is with no support.

Remixing to Protest Sample Ruling


Remixing to Protest Sample Ruling 09/22/2004 06:17 AM
Music fans are miffed about a court decision that says musicians must get permission to sample tunes even if the remix bears no resemblance to the original. An activist group is sponsoring a remix project based upon the clip in question. By Katie Dean.

Java Hello World sample application


Java Hello World sample application 09/04/2004 05:31 PM
Tech-Recipes Sep 4 2004 9:45PM GMT

Smart Client Sample: FotoVision


Smart Client Sample: FotoVision 06/23/2004 11:53 PM
The FotoVision sample allows you to easily share photos on the web and demonstrates a variety of .NET technologies including Windows Forms, ASP.NET, Web services, and the .NET Compact Framework. It consists of a desktop, web, and Pocket PC sample applications. This paper provides information so you can get the most from the FotoVision Pocket PC application. The sample is written in VB.NET and the installation application installs the pocket application on the Pocket PC device and the source code on the desktop. A Pocket PC device is not required; you can run the sample on the desktop using the Visual Studio Pocket PC emulator.

HttpHandlers and the IIS Metabase

The following phrases have been identified by the grok system as matching this entry: iis 6 xml metastorage scriptmaps sample iis vodafone conflict ihttphandler 404 error graphviz iis asp sample "asp sample" "redirect page" href phpesp iis how to control httphandlers subwebs

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

More HttpHandlers
Assembly
Dependencies

Media Watch
SitePoint: Making
Sense of the Web
Game

Builder.com:
Patterning Your PHP

phpESP 1.6 Final
BBC Websites Face
Closing

Bold Text, H1, and
H2.....

Wanted: KDE User
Stream of
Consciousness

Web-based
applications:
Shopping carts

Listen
Google / Blogger
Party Pictures

TCL Team Interview
Second foreign
service officer
resigns

Glimpse the Future?
Opening and closing
the feedback loop

Client-side state
management
techniques for .NET
architects

JProbe Profiler: The
perfect profiling
tool?

Secure your .NET
smart client apps
with CAS

Building a project
Web site the easy
way

12-March-2003 --
Unskilled and
Unaware of It: How
Difficulties in
Recognizing One's
Own Incompetence
Lead to Inflated
Self-Assessments

12-March-2003 --
Revamped Macromedia
site irks customers

12-March-2003 --
Lessons From the
Field: Beyond ROI

12-March-2003 -- US
public turns to
Europe for news

12-March-2003 --
Notes: The Future:
User-Centered Design
Goes Mainstream

WebmasterWorld
Enters Alexa Top 500

Dot-Net vs. J2EE
shootout.

13-March-2003 --
Forward

Oh holy crap...
I Hate The Core
A Question About
XHTML

GraphViz Sitemap
Generator

12-March-2003 --
Plan to snoop on
fliers takes
intrusion to new
heights

13-March-2003 --
Compare and Contrast

13-March-2003 -- The
Answer

13-March-2003 --
WebWord Comment

13-March-2003 --
Marketing Fix

13-March-2003 --
Expanding the
Approaches to User
Experience

Sorry about the
Quiet

PHP Class 'DHTML
TreeMenu' released

NetNewsWire 1.0.1fc1
Using SAX for Proper
XML Output

The XML.com
Interview: Eric
Meyer

Truth in Advertising
Twilight Zone at
Work

Movies
Now do one about
wikis

The Perils of Gamma
P. D. James
what is grok?