Web Connection
Object reference not set to an instance of an object.
Gravatar is a globally recognized avatar based on your email address. Object reference not set to an instance of an object.
  Phil Sherwood
  All
  Mar 28, 2018 @ 09:15am

I'm running my WebConnect server in File mode and it runs fine. When I switch to COM mode using the Admin page every hit to the server gets the error:

Object reference not set to an instance of an object.

When I switch back to File mode all is well.

What could be going on with it?

-Phil

Gravatar is a globally recognized avatar based on your email address. re: Object reference not set to an instance of an object.
  Rick Strahl
  Phil Sherwood
  Mar 28, 2018 @ 01:59pm

Not sure - that's coming from the .NET Module.

Can you grab the latest file from:

https://west-wind.com/files/WebConnectionExperimental.zip

and try with that? I seem to recall fixing an edge case...

Also if there's anything else in the wcerror.txt log please post that too.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Object reference not set to an instance of an object.
  Phil Sherwood
  Rick Strahl
  Mar 28, 2018 @ 02:58pm

Now it gets this error:

Invalid Com Server ProgId: WebWellProfits.WebWellProfitsServer

wcerrors.txt has the following:

**2018-03-28 17:53:06.066 - 6_2bf7b351 - Unhandled Exception (Mainline): Invalid Com Server ProgId: WebWellProfits.WebWellProfitsServer at Westwind.WebConnection.ComServerManager.LoadServers() at Westwind.WebConnection.WebConnectionHandler.HandleAdminTasks() at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/LoadComServers.wc? **

The Web Connection Handler Status Page shows this:

Gravatar is a globally recognized avatar based on your email address. re: Object reference not set to an instance of an object.
  Rick Strahl
  Phil Sherwood
  Mar 28, 2018 @ 04:33pm

I assume this is with the new DLL. Are you getting a different error now that's showing in the UI (object reference error)? You should be...

Right - so your COM server is not registered or registered under a different id or you app doesn't have rights to launch (DCOMCnfg)?

Make sure you can launch the server from FoxPro on your machine (or the server if that's where it's failing):

loServer = CREATEOBJECT("WebWellProfits.WebWellProfitsServer")

*** Point to a script page or 'request'
? o.ProcessHit("&PHYSICAL_PATH=c:\webconnection\web\wconnect\TestPage.wwd")

If you have special permissions set up I recommend start with SYSTEM for the Application Pools and Launching User (or nothing) for the DCOM configuration.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Object reference not set to an instance of an object.
  Phil Sherwood
  Rick Strahl
  Mar 29, 2018 @ 06:49am

I'm getting closer. I changed the Define Class in WebWellProfitsMain from:

DEFINE CLASS WebwellprofitsServer AS wwSERVER OLEPUBLIC

to

DEFINE CLASS WebwellprofitsServer AS WWC_SERVER OLEPUBLIC

and that fixed the Object Reference error. Now I'm getting this error when I attempt to load the COM server:

Unknown application error
Unable to load server. Access Denied: The account doesn't have the required rights to load COM instance.

Retrieving the COM class factory for component with CLSID {D1AF945A-57AD-42F6-AB16-A010E91909E1} failed due to the following error: 
80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

The app pool user is NetworkService. It has full rights in the deploy folder. The user I'm signed into the Admin page with is WebConnect. It has full rights on the deploy folder. What am I missing?

-Phil

Gravatar is a globally recognized avatar based on your email address. re: Object reference not set to an instance of an object.
  Rick Strahl
  Phil Sherwood
  Mar 29, 2018 @ 01:58pm

NETWORK SERVICE doesn't have rights to load a COM object by default and you have to use DCOMCNFG to set it up to allow access.

However, before you do that - try running with your application pool under SYSTEM first to make sure that's the issue. Mucking with DCOMCNFG is the last thing you want to do.

+++ Rick ---

© 1996-2024