I wrote in my previous post that you should use http to access web part resources. Well guess what -- there is more to it.
If your WSS site is running with anonymous access off, then the attempt to get the resource will fail with a 401 Unauthorized error. This happens because web requests made in code will perform an anonymous GET.
In my specific case, I was attempting to read an XSLT file from the resource directory by passing the URL to the file. To solve the security issue, the Load() method on the XslTransform object needs a security resolver. The code necessary for this (which I copied from the .Net SDK):
' Build the URI to the resource
Dim resourceURI As Uri = New Uri(ClassResourcePath)
Dim xslPath As String = Path.Combine(resourceURI.ToString(), "filename.xsl")
' Create a secure resolver with default credentials.
Dim resolver as XmlUrlResolver = new XmlUrlResolver()
Dim sResolver as XmlSecureResolver = new XmlSecureResolver(resolver, xslPath)
sResolver.Credentials = CredentialCache.DefaultCredentials
' Get the xsl file
Dim trn As XslTransform = New XslTransform
trn.Load(xslPath, sResolver)