Archive for June, 2005

Integrating VSS witn Dreamweaver and VS.NET

If you don’t have the origional installation disk for Visual Souce Safe, but have it installed somewhere. You can still integrate it with Dreamweaver and VS.NET, by following the steps:

1. Copy the VSSWin32 folder to your local hard drive

2. Run Regsvr32 on SSSCC.DLL, SSAPI.DLL and NLHTML.DLL

3. Run SSINT.Exe


Categories: Uncategorized

Installing IIS on XP Home

Although it’s a hack, I just figured out how to install IIS on XP Home. With the help of these two urls.


I did hit two problems, one was that it came up with an error "The Specified Module Could not be found" – This is fioxed by opening the IIS snap in, properties > Directory Security > Anonymous access > edit > then uncheck "Allow IIS to control password".

Then, to install .NET, I used aspnet_regiis.exe -i


As an experiment, I tried to get .NET beta 2 to install aswell,but I got this error in the event log

Exception: System.NullReferenceException

Message: Object reference not set to an instance of an object.

StackTrace: at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)

at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters).


Categories: Uncategorized

Stored Procedure version control

Often, when you work on a large scale database-driven application, you end up with hundreds of stored procedures. As the project evolves, the stored procedures get modified over time, and you often loose older versions of stored procedures.

Although there are many ways to provide stored procedure version control, I opted for a simple approach.

If you have a stored proc called MyProc, before editiing it, create a new procedure called MyProc;2. then edit MyProc (which I shall refer to as MyProc;1 for clarity).

When you call exec MyProc, then MyProc;1 will be executed. and MyProc;2 will not appear in any lists of stored procedures in Enterprise manager or Query Analyser.

To view the source of an older version of a stored proc, you can no longer use sp_helptext, but you can say "select text from syscomments where
id=(select id from sysobjects where name=’myProc’)




Categories: Uncategorized

Google UK reshuffle

Just noticed that Google UK is going through it’s reshuffle / pruning phase tonight. I’ve seen certain sites rapidly move positions under successive searches for the same keyword, and a large pruning of unscanned pages. (pages whoose link has been indexed, but not the content of the page).

Also a little interesting discovery. Ever notice the BIW parameter in a Google search. It’s your browsers width in pixels. – I thought it was a session id….


Categories: Uncategorized

Changing a Cookie’s path C#

When using a httpWebRequest to a page, with an attached Cookie container, you may find sometimes that the Cookie is set with the wrong path, for instance /cgi-bin/process.cgi rather than cgi-bin/ – This may make the cookie unreadable to other pages within that folder.

Fear not, the solution is simple

Dim cA As Cookie
Dim ccS As CookieCollection
ccS = RequestCookies.GetCookies(
New Uri("))
cA = ccS.Item(0)
cA.Path = "/cgi-bin"

RequestCookies being a Cookie Container object.


Categories: Uncategorized

IIS problems

I wasn’t able to find any information on these errors which are routinely crashing my IIS server. And I was hoping somebody could throw some light on them

Fault bucket 197406881.

Reporting queued error: faulting application w3wp.exe, version 6.0.3790.1830, faulting module ntdll.dll, version 5.2.3790.1830, fault address 0x0001c93c.

ISAPI ‘C:WINDOWSMicrosoft.NETFrameworkv1.1.4322aspnet_isapi.dll’ reported itself as unhealthy for the following reason: ‘Deadlock detected’.

Error: File /Default.asp  Script Engine Exception. A ScriptEngine threw exception ‘C0000005’ in ‘IActiveScript::SetScriptState()’ from ‘CActiveScriptEngine::ReuseEngine()’..

Error: File /articles/header.asp  Unexpected error. A trappable error (C0000005) occurred in an external object. The script cannot continue running..

Error: File /  Script Engine Exception. A ScriptEngine threw exception ‘C0000005’ in ‘IActiveScript::SetScriptState()’ from ‘CActiveScriptEngine::ReuseEngine()’..

Error:   Script Engine Exception. A ScriptEngine threw exception ‘C0000005’ in ‘IScriptDispatchEx::Release()’ from ‘CScriptingNamespace::UnInit()’..

Error: File /articles/wmi.asp  Unexpected error. A trappable error (C0000005) occurred in an external object. The script cannot continue running..


Categories: Uncategorized

An alternative way to do rollovers in javascript

Ok, this is more web design than .NET development, but I thought I’d share this tip. If you’re like me, you hate working with the highly complex table structure that gets generated when you press "Save for the web" in photoshop. You end up with little fine white lines cropping up between cells and ruining the look of your site.

Generally, when you have a button placed upon a background, you have to cut the image up into table cells, and then use an onMouseOver / onMouseOut attributes on the image to provide the rollover effect. But if you have 20 buttons on an image, placed irregularly on a background image, you end up with having to cut out 50 or so different cells with image fragments. And then it all becomes messy.

What I propose to to use a background image, and trap mouse movements over that image. when it falls within a particular window ie 20,20 to 30,30 – It overlays another image on top, providing a rollover effect (* Actually more of a ‘Hover’ effect, but quite similar), without having to cut up the image.

To give a sample of the javascript:

<script language="JavaScript">

var intRollovers = 2; 
var intSx = new Array; // start x (left)
var intEx = new Array; // end x (right)
var intSy = new Array; // start y (top)
var intEy = new Array; // end y (bottom)
var strImage =new Array; // Rollover image
var strLink =new Array; // hyperlink
var imgCache = new Array;

intSx[1]=224;intEx[1]=296;intSy[1]=88;intEy[1]=106;strImage[1]="ZoneDesign/HomeOn.gif";   strLink[1]="default.aspx";

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
if (!IE) document.captureEvents(Event.MOUSEDOWN)
document.onmousemove = getMouseXY;
document.onmousedown = getMouseXY;

function getMouseXY(e)
 if (IE)
  tempX = event.clientX + document.body.scrollLeft;
  tempY = event.clientY + document.body.scrollTop;
  tempX = e.pageX;
  tempY = e.pageY;
  if (tempX>intSx[i] &&
   tempX<intEx[i] &&
   tempY>intSy[i] &&
   document.all["imgRollover"].style.left = intSx[i];
   document.all["imgRollover"] = intSy[i];
   document.all["imgRollover"].onload = unHideImage;   
   if ((IE && event.button == 1) || (!IE && e.which == 2))
 return true;

function unHideImage()


Then include the following HTML after the body tag

<img id="imgRollover" style="position:absolute; display:none">

Categories: Uncategorized

IIS worker process isolation mode

I found my IIS server crashing more often than usual, and although a net stop w3svc / net start w3svc was bringing it up to speed again. I couldn’t rely on this to keep the server going on a long-term basis

I looked in the Event log, and found a recurring error which read "It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.". As readers of this blog will know I have .NET 2.0 beta 2 installed on my server, along with .NET 1.1. So I read up on the Microsoft Technet site about IIS worker processes, and it seemed to recommend this course of action

* Create a new Application Pool specifically for .NET 2.0 apps.

* Right click on a .NET 2.0 website (in my case click on Home directory. Then under the drop down box for application pools, select the .NET 2.0 app-pool.

And it hasn’t crashed since. But I’ll leave it for 24 hours.



Categories: Uncategorized

Speed typing challange

Test your touch-typing abilities: 90 seconds to type a shakesperian quote. I only managed to get 12% typed before the time elapsed. 🙂

Nice little trick to do this auto submitter:






Categories: Uncategorized

WSDL doesn’t work on non standard ports

If you try to make a web reference to a web service that resides on a non-standard port (i.e. not port 80), you get an error "Unable to download files from …. Do you want to skip these files and continue?"

You get an error if you try to update the reference

Custom tool warning: DiscoCodeGenerator unable to initialize code generator.  No code generated.

The file contains the following

<DiscoveryClientResultsFile xmlns:xsd="; xmlns:xsi=""&gt;


<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="; filename="whatever.disco" />



Trying to add a reference manually using WSDL gets the following error

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.1.4322.573]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Warning: no classes were generated.

I worked around the bug, but hopefully word will get out to the Microsoft developers in charge of WSDL.exe to fix this bug.


"I before E except after C – Reinvention Being Weighty Science"

Categories: Uncategorized