How do you invoke the Scripting.FileSystemObject (normally used in asp) within a VB COM object?
I can access the asp server object by creating it in onStartPage:
[red]public sub onStartPage(sc as scriptingContext)
[tab]set aspServerObj = sc.server()
end sub[/red]
and as long as I only use server methods it works fine. For example, provided the above sub is in the class module I can write:
[red]dim str as string
str = aspServerObj.encodeURL("asdf.com?test=aasdf/asdf/^^"[/red]
but if I try to do:
[red]dim fso as FileSystemObject
set fso = aspServerObj.createObject("Scripting.FileSystemObject"[/red]
and then continue from there to read a file, it doesn't work. I tried a dozen other combinations and none of them worked (although they compiled and I don't get an asp error, just no file output). I access ordinary asp objects (response, request, server mainly) from VB COM all the time and it works fine. But the fileSystemObject is not an asp object. I would read directly from VB but I read somewhere that this is not recommended within IIS. Any help appreciated. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
I can access the asp server object by creating it in onStartPage:
[red]public sub onStartPage(sc as scriptingContext)
[tab]set aspServerObj = sc.server()
end sub[/red]
and as long as I only use server methods it works fine. For example, provided the above sub is in the class module I can write:
[red]dim str as string
str = aspServerObj.encodeURL("asdf.com?test=aasdf/asdf/^^"[/red]
but if I try to do:
[red]dim fso as FileSystemObject
set fso = aspServerObj.createObject("Scripting.FileSystemObject"[/red]
and then continue from there to read a file, it doesn't work. I tried a dozen other combinations and none of them worked (although they compiled and I don't get an asp error, just no file output). I access ordinary asp objects (response, request, server mainly) from VB COM all the time and it works fine. But the fileSystemObject is not an asp object. I would read directly from VB but I read somewhere that this is not recommended within IIS. Any help appreciated. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]