ASP Intrinsic's don't work in Component Se

Results 1 to 3 of 3

Thread: ASP Intrinsic's don't work in Component Se

  1. #1
    King Wilder Guest

    Default ASP Intrinsic's don't work in Component Se

    Here&#039s the deal... I&#039m developing on a Win2K server and having problems with ASP objects. I can get the SetComplete and SetAbort methods to work, but none of the ASP Intrinsic methods want to work. <BR><BR>When I step through my code it always fails at line 10. Once it hits the Session Object it returns:<BR><BR> Run time error: &#039 424&#039<BR> Object Required<BR><BR>I want to instantiate these objects at the beginning so I don&#039t have to place the code in every method of the class. This works OK with the ScriptingContext, but I need transactions.<BR><BR>If anyone has any ideas, I would love to hear them.<BR><BR>Thanks,<BR><BR>King Wilder<BR><BR>(My code is below)<BR><BR>&#039~~~ My code<BR>1 Implements ObjectControl<BR>2<BR>3 Private m_ObjectContext As ObjectContext<BR>4 Public mySession As ASPTypeLibrary.Session<BR>5 Public myResponse As ASPTypeLibrary.Response<BR>6 Public myRequest As ASPTypeLibrary.Request<BR>7<BR>8 Private Sub ObjectControl_Activate()<BR>9 Set m_ObjectContext = GetObjectContext()<BR>10 Set mySession = m_ObjectContext.Item("Session")<BR>11 Set myResponse = m_ObjectContext.Item("Response")<BR>12 Set myRequest = m_ObjectContext.Item("Request")<BR>13 End Sub<BR>14<BR>15 Private Function ObjectControl_CanBePooled() As Boolean<BR>16 ObjectControl_CanBePooled = False<BR>17 End Function<BR>18<BR>19 Private Sub ObjectControl_Deactivate()<BR>20 Set m_ObjectContext = Nothing<BR>21 Set mySession = Nothing<BR>22 Set myResponse = Nothing<BR>23 Set myRequest = Nothing<BR>24 End Sub<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP Intrinsic's don't work in Componen

    It will work when you&#039re not debugging.<BR><BR>Debugging interferes with MTS (or COM+) to such an extent, that it cannot instantiate the ASP intrinsic objects in time. That&#039s why you get an error.<BR><BR>The solution? don&#039t debug :).<BR><BR>no... you&#039ll have to use a combination of both context wrappers. Create a conditional block of code that is only compiled when you&#039re in debug mode. A very detailed description can be found at ASP-today named something like &#039conditionally compiling VB objects&#039.<BR><BR>There isn&#039t another solution really....

  3. #3
    King Wilder Guest

    Default RE: ASP Intrinsic's don't work in Componen

    I had a thought that might be the case, but of course I was hoping I was wrong. I&#039ve seen that conditional statement by Doug Dean in ASP Today. I&#039ll use that. <BR><BR>Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts