Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Thursday August 16, 2001
05:54 AM

More on dot NET

[ #670 ]

I swung from hate to like(ish) back to hate.

So in prep for the move, I asked work if I could work from home. I have an aging NT4 machine there, and dot NET Beta 2 is supposed to work on NT4. So I created 4 CDs (yes, it really is 4 CDs for dot NET), and took them the 400 miles home.

Day 1.

The CDs didn't work. The installer kept asking me for ".NET Enterprise Edition (English)" CD. Which I'm not sure if I had or not. So I had to figure out a way to find 1.8GB of free space on my hard drive to copy all the files over (I'd already installed from individual files at work, so figured that would work). I only had 1.2GB free on a partition I had set free for BeOS (which I never made use of). So, I converted it to NTFS (It was FAT), rebooted (because it needed the reboot to do the conversion), and then switched on "NTFS Compression". That's kinda cool - to be able to do on the fly compression of all data on the hard drive and have it just work completely transparently. So that freed up enough space.

After copying everything over, I installed .NET. Note that every time I try the install it takes about 15 minutes to even get started, because of all the crap it has to load into memory (a quick check of task manager shows the installer using 80MB of RAM). Finally, Visual Studio runs.

Day 2.

I go to create my first web service... It can't create the web site on localhost. Reason? No IIS installed. Of course IIS doesn't come on those 4 CDs... So I find IIS 2 on the NT CD, but I *know* that's not going to be enough, and the service packs don't update IIS... I hunt around my CD collection. A dusty copy of Visual Studio 6 reveals a copy of the NT 4 option pack (I can't download it - it's about 100MB and my 64K link would have taken all day and night). So I get IIS 4 installed. Of course I then have to re-install Service Pack 6, and the Frontpage extensions...

After a few reboots, I re-run Visual Studio (VS), and create my project again. Creation works!

I uncomment the "Hello World" web service in the default web service project... I hit F5, waiting in anticipation... Of course it fails! And with an obscure error message no less.

Research indicates that there's nothing in my IIS installation registered to execute .asmx files (ASP.NET files), and a lwp-request (the first Perl I used since starting on this) on the relevant URL reveals nothing but the source code. Something is fishy.

Day 3.

I find a program on my machine called "regasp_iis.exe" in the .NET framework folder. I run it. "Can't find aspnet_isapi.dll". Curiouser and curiouser.

I hunt and hunt. Is it me, or is NTFS DOG-FUCKING-SLOW!!!

No aspnet_isapi.dll anywhere.

I reinstall all of .NET. From scratch. 2 hours passes.

Nope, still no aspnet_isapi.dll.

I could kill something about now. I wished I had a Microsoft Sales Rep sat next to me.
Google comes to the rescue.

I hate Google's new "groups" interface. Give me back the original dejanews interface. It was nice, clean, simple and worked. However searches in google groups seem better, and that's what I needed right now.

I plug in my error message into the search box.

It comes back with a fair few hits. I carefully examine each one. Eventually I find the gem hidden within the cold dark coal.

"ASP.NET [the framework used to build web services] does not currently work on NT4, you need Windows 2000 and IIS 5".

Arghhhhhh!!!

I run screaming back to Perl.

Here's my equivalent of ".NET" for a legacy COM object in Perl:

    #!perl -w
    use strict;
    use Win32::OLE;
    use SOAP::Lite;
    use SOAP::Transport::HTTP;
    my $server = SOAP::Transport::HTTP::Daemon->new(
                LocalPort => 8080, Reuse => 1,
                )
                ->dispatch_to('My')
                ->objects_by_reference('Win32::OLE')
                ->dispatch_with(
    {'http://example.com/Win32/OLE' => 'Win32::OLE'}
                )
                ;
    our $obj = Win32::OLE->new("StarDB1p4.Service");
    $obj->ReadConfiguration('C:\components\Insight1p22.cfg');
    sub My::Service {
        return $obj;
    }
    $server->handle;

I love SOAP::Lite more and more.

So, in order to round off this wonderfullness, I get to work today, and I have Win2K on this machine. So I start again. I create a web service. It works! It's kinda neat in that it creates some big HTML page to test the service, view the response, view the WSDL, etc. That was just Hello World.

When I add in my COM object that I need to create into a service, I get:

"System.__ComObject cannot be serialized because it does not have a default public constructor"

dot NET can't proxy COM objects for me. SOAP::Lite can. I wonder what my conclusions of this research will be...