Fog Creek Software
Discussion Board

Dynamic Website on a CD: Any Ideas?

A few weeks ago I noticed an article that detailed how to build a dynamic website using client-side VBScript and an Access database that could all be put onto a CD.

The benefit of this is if you're working for a company -- such as I do -- where the sales managers want (or *need*, depending on whom you ask) to be able to give our website to potential customers who don't have a good Internet connection -- such as in third world countries.

The pain in the ass part comes because there's now duplicate information; on the Web and on the CD. And since the Web is dynamic and is updated online, the previous way to update the catalog CD was to do it manually.

The article showed a way to download the same database (if you're happening to use Access already, or can convert to Access) to your offline project. I tried it and although it technically works it pops up lots of ActiveX warnings and so on. Oh, and it only works in Internet Explorer.

I could drop the database into a Visual Basic *.exe program -- which is quite logical and suprisingly simple (which is a possible topic for another day). The only problem is that the sales managers want the CD to act and be navigable like a website.

But ASP, for instance, needs a server (specifically, the ASP.dll if we're not mistaken) to run the VBScript. Client-side VBScript will only work in IE. And connecting to the DB is a security hazard apparently. Creating a VB program defeats the purpose of the whole look and feel -- but I'm no expert in VB.

Sooooo, what I need is a way to create an offline website on a CD that uses an Access database. Any suggestions will be mightily appreciated.

Thursday, August 21, 2003

What about running a web-server on the CD?  You'd have to have logging disabled of course...

Thursday, August 21, 2003

Yup, you'll have to install an ASP-capable web server on the CD, and duplicate the entire site, including the database.

Frederic Faure
Thursday, August 21, 2003

Konrad and Frederic:

Sounds cool. Is it possible to install IIS, or a derivative of it?


Chi Lambda
Thursday, August 21, 2003

One idea is to grab the source for a simple web server from sourceforge or any number of code sites. Put placeholders on the HTML code to be replaced by the web server. Just look for where the browser requests are handled and do a Replace() of the placeholders with whatever you want, before sending the response pages to the browser. Heck you could even use ASP-like tags or your own tags.

I got VB code from a dead web server project and converted it in about an hour. I'm planning on adding XML-RPC support in the near future. Email me if you want to take a look at what I have.

Thursday, August 21, 2003

If I was doing it I'd start with using something like apache and (Apache-asp) - my guess is you'd want apache to autorun as a service, then open a URL to localhost when the CD is inserted but I'm not sure how shutting down the service would work.  There'd also be a problem if this CD was inserted on a machine running a webserver so it might be a plan to use a really obscure high-range port.

That and dsn-less connections for your DB and I think you might be cooking on gas.

Thursday, August 21, 2003

Just how dynamic is the website?

Would it be possible to publish a set of static html files to the website?

This would be so much easier that try to turn a CD into a web server.

Ged Byrne
Thursday, August 21, 2003

Microsoft has an open-source webserver available. Magellan, I think?


Thursday, August 21, 2003

It is called Cassini and here ( ) is the article and code describing how to do what you want with it.

"In the September and October 2000 issues of MSDN® Magazine I discussed how to build a client-side environment for ASP applications; that is, a serverless environment to run ASP pages (see Cutting Edge: A Client-side Environment for ASP Pages and Cutting Edge: A Client-side Environment for ASP Pages—Part 2). Those columns were inspired by the following scenario.
  Suppose that one of your clients needs to distribute some online content using a CD—an encyclopedia, yellow pages, or a collection of documents, for example. The client needs a viewer application to be included with the CD and a flexible software architecture to deliver the contents. Furthermore, the client would prefer that the CD didn't inconvenience the user with special system requirements other than a minimum processor and a recent version of Windows®. This means that the final application should not rely on Microsoft® Internet Information Services (IIS) or the Personal Web Server included in home versions of Windows. It should run offline in a pure, serverless environment."

Just me (Sir to you)
Thursday, August 21, 2003

Forgot the link to the Cassini download page

Also note that the article I linked to above describes how to do ASP.NET hosting running from a CD. The comments about ASP above refer to the 2000 article series that this article is a followup on.

Just me (Sir to you)
Thursday, August 21, 2003

Just Me:

My scripts are in classic ASP (3.0) and I would need to be able to run the CD on computers as far back as Windows 95. (Remember, these are third world countries we do business with.)

Thanks for the info.

Chi Lambda
Thursday, August 21, 2003

I'm not 100% sure but I think you could be lucky with the original solution described in

Just me (Sir to you)
Thursday, August 21, 2003

Um, CityDesk?  ;>

Sam Livingston-Gray
Thursday, August 21, 2003

A possible solution to your problem:

If you can deal with an IE-only solution, these folks have developed a server-in-a-DLL using Microsoft's pluggable protocol, and it supports ASP.

Thursday, August 21, 2003

But do yuo really need to have dynamic site?  How dynamic it can be with readonly database.

If .asp can only create limitted number of pages write script to create all possible pages as .html files.  Build navigation to work with .html files instead of .asp -- so would come out http://cd/bar/a1/b2/data.html.

Why mess with installing & running extras.  How hard it would be to make script/spider to do this from your production site?

Sanger B
Thursday, August 21, 2003

If your files are ASPs just for the sake of retriveing data off the database and displaying it in the form of links, articles and such (that is, there is no "interactivity"), there is a solution:

1) Put your files on a real IIS
2) Run a spider (Black Widow, wget, anything that can surf pages, save them and follow their links) to make a "local copy" of your application.
3) Save this local copy on the CD. An autorun.inf pointing to the index.html or something like that should be fine to open the user's browser.

This solution lets you use the ease of a database for storing articles, pictures and such, but frees the user of having the database to read them. Watch out for space constraints (each article, for example, will have its HTML representation stored in it entirety). It worked fine for me in the past.

Thursday, August 21, 2003

If there are dynamic elements to your site but they can all be resolved to known values pre viewing you might try Fog Creek's CityDesk.

Another thing to make things dynamic is to copy the MDB to C:\temp drive before opening it.

Li-fan Chen
Thursday, August 21, 2003

If it's going on a CD-ROM to be sent to people with little-to-no connection, why does it have to be dynamic at all?  Why not use something like CityDesk or Panager (*eg*) to generate HTML pages from the database when you're ready to burn them?  Certainly you could burn the database to the CD if they wanted it to run stats on, or such, but if you're writing to a static medium why worry about a dynamic webpage?

Andrew Burton
Thursday, August 21, 2003

Even though it doesn't have a connection, that doesn't mean there's no value to having dynamic content. For instance, how would you do an industrial strength search system with all static content?

Brad Wilson (
Thursday, August 21, 2003


Please look at our - it shows full ASP server-less solution with wizard and application host. So far it is for classical ASP applications (no ASP.NET yet)



Mirek Sopek, MakoLab
Saturday, April 10, 2004

*  Recent Topics

*  Fog Creek Home