ThreadPool.QueueUserWorkItem NullReferenceException

Why I'm getting this error. My variables get the names from request, and also i tried "data.qext" but visual studio give me error.

I got "test.pdf" file in my WebsiteRoot/uploads/files/test.pdf, but still there is an error. Maybe I'm missing something?

Check image for detailed description: http://prntscr.com/7wnid

Answers


You can try this method instead of HttpContext.Current.Server.MapPath:

System.Web.Hosting.HostingEnvironment.MapPath()

Doing so, there's no need for an HttpContext.


Need Your Help

Dropping a session upon page load

php session

I have a checkout system I created. Whenever someone has submitted their order I take them to another page that thanks them for their order and gives them a brief summary of what they ordered. It is