Blog Home  Home RSS 2.0 Atom 1.0 CDF  
Hairy Spider Blog - Multisite
A web of intrigue
 
 Wednesday, October 24, 2007
After many requests I've decided to release the source code to the multisite isapi extension.

If you wish please download the source code. Have fun with the code, it's given me months of enjoyment. Any problems, please get in touch in the usual manner.

10/24/2007 2:47:13 PM (GMT Daylight Time, UTC+01:00)  #      Multisite  | 
 Monday, November 28, 2005

I first wrote multisite about 3 years ago. It's a really simple ISAPI filter that allows IIS to "apparently" host more that one website. It's not designed as a replacement for a proper server shouldn't be used for anything other than development.

The reason I wrote multisite is because at the time I was writing a CMS which controlled a number of sites. I wanted to be able to host the CMS and the client sites on my development machine without having to continually reconfigure IIS.

Under classic asp it worked really well. The second version allowed one to configure the site through it's own webpage. I have a new version waiting to be put up, but one thing that's always been a problem has been hosting more than one ASP.Net application. It is possible to host multiple asp.net applications, I think that they need to be installed on IIS as proper virtual applications.

Now, I think that under ASP.Net 2 that there may finally be a nicer answer. I've just read these two posts and I think that VirtualPathProvider may hold a number of answers. Of course with ASP.Net you've always been able to create a web application outside of IIS but why would you want to reinvent the IIS wheel?

VirtualPathProvider Extensibility in ASP.NET 2.0
Overriding ASP.NET combine behavior using a VirtualPathProvider

I must admit that I don't really get a great deal of time these days to do much development work of my own. I'll take a look at these and then maybe finally I can put Multisite to bed.
11/28/2005 10:51:58 AM (GMT Standard Time, UTC+00:00)  #      .net | Multisite  | 
 Friday, February 11, 2005
OK and so the most requested failed page at the moment is for Multisite. Here's the exact copy of the old multisite page, without the paypal stuff as that never paid anyway :(

ISAPI - MultiSite Filter Version 2

Introduction

Windows 2000 and XP (Professional) are only able to run one website at a time, when you are developing in a multisite environment it is practically impossible particularly when one site depends on another. Using Multisite one can extend IIS to run as many websites as you need.

The Multisite filter is an ISAPI filter which runs at the root, interrogates the host header of the incoming http request and on the outcome of that redirects the request to the relevant place in the filesystem.

Using Multisite

To set up multiple sites using the MultiSite ISAPI filter, follow these 4 steps:

  1. Copy 'multisite.dll' a location on your C drive
  2. Register the 'multisite.dll' as an ISAPI filter on your IIS server.
    • IIS Management Console
    • Right click your website; Typically called 'Default Web Site and choose 'Properties'
    • Click the tab 'ISAPI Filters'
    • Press the 'Add'-button
    • Filtername: 'multisite'
    Executable: Browse to, and select 'multisite.dll' (just copied to C Drive:)
  3. Once this is done you should be ready to go. Point your browser to http://127.0.0.1/multi.config Now you can add sites through this interface rather than editing obscure ini files, for example:

    URL:
    Path:
    Default Document:
  4. MultiSite will now automatically edit your hosts file, typically located in %WINDIR%\SYSTEM32\DRIVERS\ETC\hosts, you may find trouble if you have no access to this file. If this is true then you will have to add the local redirects yourself:

    	127.0.0.1 aquarium.dev.net
    	127.0.0.1 firstpage
    	127.0.0.1 karate.local
    							

    As you can see, for each website first write down the ip 127.0.0.1 which resolves to 'localhost' a.k.a. the pc you are working on; Following the ip, write down the hostname to refer to your localhost*. * Remember; The 'multisite' ISAPI filter will make IIS use the right webroot by looking at the hostname.

  5. Reset IIS, or stop/start the service. You should now be able to use your configured websites:
    http://aquarium.dev.net

Download Multisite

Download Multisite Version 2

Disclaimer:

You use this software at your own risk.
MultiSite is not supported by Hairy Spider at all.
MultiSite is designed for Windows 2000 Professional not Server.
Download Multisite Version 1

Acknowledgments:

With special thanks to Rob

2/11/2005 6:44:44 PM (GMT Standard Time, UTC+00:00)  #      Multisite  | 
 Monday, February 23, 2004

While trying to work out why my asp files weren't being processed by the ASP engine. I discovered that the files processed by ASP are reliant on the extension requested for by the client rather than that served by the filesystem.

It's not particularly interesting but atleast if I write it here I won't make the same mistake twice.

Now I have to find out why I get very different behaviour between my debug configuration and release configuration. This seems to apply to registry reads and writes. The first call seems to fail but calling the RegQueryValueEx method twice seems to fix the problem. I don't want to get into development debt so I'll have to work out why it's failing.

2/23/2004 9:20:19 AM (GMT Standard Time, UTC+00:00)  #      Multisite  | 
Copyright © 2008 Rhys Jeremiah. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: