Scripting Component and ASP 
Author Message
 Scripting Component and ASP

I created and registered a WSH component the implements type="ASP" to call
from my ASP app.

The problem is when I try to read or write to the an ASP Application or
Session Object from within my component.  I get the following VBScript
error:

Description: Object doesn't support this property or method: 'Session'

From what I have read in the documentation, I should be able to use all ASP
objects from within my script component.  The Request and Response objects
work just fine.

Can anyone give me a clue to why this is happening?

Thanks for your time and help.

Tony.



Mon, 06 Jun 2005 02:41:32 GMT  
 Scripting Component and ASP
I'll guess that you have something like:

Session("SomeName") = SomeValue

Try doing the explicit reference for the contents collection:

Session.Contents("SomeName") = SomeValue

Thanks to M. Harris for pointing this little issue (with WSCs pre{*filter*}ly) to me about 2 years ago -- someone missed
setting .Contents to be the default property of the Session object.

Chris Barber.

I created and registered a WSH component the implements type="ASP" to call
from my ASP app.

The problem is when I try to read or write to the an ASP Application or
Session Object from within my component.  I get the following VBScript
error:

Description: Object doesn't support this property or method: 'Session'

From what I have read in the documentation, I should be able to use all ASP
objects from within my script component.  The Request and Response objects
work just fine.

Can anyone give me a clue to why this is happening?

Thanks for your time and help.

Tony.



Mon, 06 Jun 2005 09:01:27 GMT  
 Scripting Component and ASP
Thanks Chris.  Worked like a charm.

Quote:
> I'll guess that you have something like:

> Session("SomeName") = SomeValue

> Try doing the explicit reference for the contents collection:

> Session.Contents("SomeName") = SomeValue

> Thanks to M. Harris for pointing this little issue (with WSCs

pre{*filter*}ly) to me about 2 years ago -- someone missed
Quote:
> setting .Contents to be the default property of the Session object.

> Chris Barber.




Quote:
> I created and registered a WSH component the implements type="ASP" to call
> from my ASP app.

> The problem is when I try to read or write to the an ASP Application or
> Session Object from within my component.  I get the following VBScript
> error:

> Description: Object doesn't support this property or method: 'Session'

> From what I have read in the documentation, I should be able to use all
ASP
> objects from within my script component.  The Request and Response objects
> work just fine.

> Can anyone give me a clue to why this is happening?

> Thanks for your time and help.

> Tony.



Tue, 07 Jun 2005 04:53:32 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Scripting Components in ASP vs Includes

2. Accessing VB component interfaces from ASP script?

3. Accessing VB component interfaces from ASP script?

4. Problem with VC component in ASP-VB Script

5. New Scripting Clinic article on Windows Script Components

6. New Scripting Clinic article on Windows Script Components

7. I am looking for a HTTP/1.1 ASP component

8. Fabricated Recordset in ASP won′t pass to VB component

9. ASP component link error

10. URGENT: ASP Components from Visual Basic -- Help Required Please

11. components and asp

12. Good ASP Graph/Chart Component?

 

 
Powered by phpBB® Forum Software