Web Development with Visual FoxPro
IIS - ASP - COM+ Error
Gravatar is a globally recognized avatar based on your email address. IIS - ASP - COM+ Error
  XAVIER
  All
  Oct 23, 2019 @ 03:09am

Hello

I have created an MTDLL and setup a COM+ used with IIS.

I am getting the followig errors randomly in my DLL.

1426 - OLE error code 0x80020003: Member not found.

Member SERVERVARIABLES does not evaluate to an object.

OLE IDispatch exception code 0 from Response object: 006ASP 0211Object out of scope~A built-in ASP object has been referenced, which is no longer valid...

the object is created with oMTS = CreateObject("MTxAS.AppServer.1") oContext = oMTS.GetObjectContext()

Thank you

Xavier

Gravatar is a globally recognized avatar based on your email address. re: IIS - ASP - COM+ Error
  Rick Strahl
  XAVIER
  Oct 23, 2019 @ 03:13pm

Where are you calling this from?

Context objects are scoped to a single request and if you do anything like store the object in Session state and then try to access that context object again it won't be in scope.

Also if you're using a non-WebForms ASP.NET implementation those aren't STA safe and may cause thread corruption for FoxPro and its own request context it can access. Basically the only 'stock' safe way to use ASP.NET with FoxPro is via WebForms. If you use anything else you have to explicitly create the correct STA thread environment as outlined in this very old article here:

https://weblog.west-wind.com/posts/2012/sep/18/creating-sta-com-compatible-aspnet-applications

+++ Rick ---

© 1996-2019