Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Issues with Connection Provider

Issues with Connection Provider

Søren Heide Larsen
Søren Heide Larsen
Reply

Hi,

I am getting a null-pointer exception and I have tracked it down to that the ExecutionTable is null.

This is because the Dynamicweb.Environment.Web.SetupExecutionTable is run after my code (which is also run from AfterStart a Notification).

Can you please modify SetupExecutionTable to execute in BeforeStart?

Best Regards
Søren


Replies

 
Søren Møller Larsen
Søren Møller Larsen
Reply
Men nu kan jeg se at CreateConnection() er afhængig af Request, hvilket ikke er særligt hensigtsmæssigt i dette scenarie.

Vil i rette linje 12
fra: if (HttpContext.Current == null) return null;
til: if (HttpContext.Current?.Request == null) return null;

[HttpException (0x80004005): Request is not available in this context]
   System.Web.HttpContext.get_Request() +9861699
   Dynamicweb.Environment.Web.ExecutionTableMapper.GetExecutionTable() +177
   Dynamicweb.Data.Database.CreateConnection() +17
 
Martin Vang
Reply

Hi Søren,

I assume you're using a subscriber to do stuff at application start? If so, you can change the fireing time to be > -50 and it should work again.

Mind if I ask, why do you need to access the ExecutionTable at application start?

I happy you also feel that Database should be seperate from HttpContext. It should be like you requested in the latest release version. Which version of the following packages are you using:

Dynamicweb.Environment.Web

Dynamicweb.Diagnostics

Dynamicweb.Data

 

BR

Martin

 

You must be logged in to post in the forum