I have got a code which, I believe, has been working for ages but it suddenly comes up with an error when referencing the Server.MapPath in a class.
I am using HttpContext.Current.Server.MapPath but now I seem to get an error saying "Object reference not set to an instance of an object"
Catch ex As Exception
Using w As StreamWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath("../App_Data/") & "logCopiarACP_" & pEm_Id & ".txt")
Log("CopiarPropiedades2015_Videos " & ex.Message, w)
End Using