I am trying read an email template from the background job which has been written in class file. I tried to use HttpContext.Current.Server.MapPath("~/path")
but it did not work as HttpContext
is not valid.
Also I tried to use System.Web.Hosting.HostingEnvironment.MapPath("~/path")
and I am getting path but it's throwing error as could not find file. Our application is hosted in shared hosting.
Any idea how can I read file content from class file in C# Web Application.
Aucun commentaire:
Enregistrer un commentaire