Alternative of System.Web.HttpContext.Current when using ProgressBox

sitecore

Solution

You can use

HostingEnvironment.MapPath(string path)

Problem

Im running a long process using ProgressBox, and in that process im using System.Web.HttpContext.Current.Server.MapPath() method, which throws exception because System.Web.HttpContext.Current is null, Is there any method to do same functionality?

Original source