API
Version 7.x > API > Custom Info Provider HttpContext.Current is null View modes: 
User avatar
Member
Member
ksell - 4/24/2013 2:36:57 PM
   
Custom Info Provider HttpContext.Current is null
I am running into an issue with the HttpContext.Current is set null in my Custom Info providers when I try to access information from a cart, e.g. UnitTotalTaxInMainCurrency of a ShoppingCartItemInfo, from an async task in the integration bus. I need to get a file from the server using HttpContext.Current.Server.MapPath() but because HttpContext.Current is null I cannot read in the file.

Does anyone know of a way around this issue?

User avatar
Certified Developer 13
Certified Developer 13
alen@endora.hr - 4/30/2013 4:36:21 AM
   
RE:Custom Info Provider HttpContext.Current is null
You could pass the HttpContext or Server from the page to your custom code