Developer forum

Forum » CMS - Standard features » GetImage Monitoring error

GetImage Monitoring error

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

We're having an error reported in the Monitoring tool related to a null value in the source parameter

2022-02-10 11:05:03.102: Value cannot be null. Parameter name: source. System.ArgumentNullException: Value cannot be null. Parameter name: source
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at Dynamicweb.Admin.ProcessImageHandler.GetParameters()
at Dynamicweb.Admin.ProcessImageHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2022-02-10 11:05:03.122: Request headers: [   "Host",   "User-Agent" ]
2022-02-10 11:05:03.122: Request item keys: [   "ExecutionTableMapper",   "Dynamicweb.Environment.Web",   "owin.Environment",   "AspSessionIDManagerInitializeRequestCalled" ]
2022-02-10 11:05:03.122: Request form: []

 

The odd thing is that I would expect this error to be reported every single time the request happens, but that's not the case. So I am confused why this happens sometimes.

Does anyone know why?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

This one happens because the request only have these 2 headers:

Request headers: [   "Host",   "User-Agent" ]

The exception comes from a conditional in getimage that looks at accept types. DW checks if the user agent accepts webp images since that is what you are asking about - if it is not supported, it sends out jpg.

This request comes from a non-client - a bot of sorts, and that is causing this issue.

I will fix the null ref issue.

BR Nicolai

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks for the explanation, and the fix is perfect, then I'll consider it a non-issue.

If you can an ID, I can then track it against a version update.

 

BR

Nuno

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Has this been release? I just want to match it to a hotfix and upgrade that site

 

BR

Nuno Aguiar

 

You must be logged in to post in the forum