Hi

Have an unspectacular asp script
Code:
	set obj=Server.CreateObject("MyWeb_dll.clsUser")
	obj.StartCom
	set obj = nothing
and this in clsUser in the dll (ripped off from the internet)
Code:
Public Sub StartCom()

    Dim objContext As ObjectContext
    Dim objResponse As Response
    Dim objRequest  As Request
    Dim objApplication  As Application
    Dim objSession As Session
    Set objContext = GetObjectContext()
        
    Set objApplication = objContext("Application") 'Obtain ASP Application object.
    Set objSession = objContext("Session") 'Obtain ASP Session object.
    Set objResponse = objContext("Response") ' Obtain ASP Response object.
    Set objRequest = objContext("Request")   ' Obtain ASP Request  object.

    'This code uses the Response object (objResponse);
    'you can use other intrinsic objects in a similar fashion.
    objResponse.Write "Hello World!"
        
End Sub
It errors when the code gets as far as setting objApplication. 91, object variable or with blobk variable not set. I've set references to MS ASP Object library and Com+ service type library. What am I not doing right? I am only debugging at the mo so haven't registered any compiled dll with the Component Services - is this where I could be going wrong? Could it be an IIS setting?

Help!