In a ASP.Net Core 2.1 App I am writing byte array as a pdf file to a location with below code
byte[] arr = await rpt.BuildFile(actionContextAccessor.ActionContext);
System.IO.File.WriteAllBytes(Path.Combine(env.WebRootPath, "Storage", "PDF", HttpContext.Session.GetString("UserID"), Name), arr);
Now I also want to store same byte array as pdf over a http location
string _path = "http://MyApps.in/document_1/" + Model.Identifier.Substring(0, 4) + "/" + Name;
System.IO.File.WriteAllBytes(_path, arr);
But it does not seems to work this way look like File.WriteAllBytes
does not write over HTTP location.
How can I write pdf file over HTTP location ??