[AcceptVerbs("GET")] [AllowAnonymous] [Route("ManageAccount/{id}")] public HttpResponseMessage ManageAccount(string id) { if (! String.IsNullOrEmpty(id)) { var path = "C:/Users/user/Project/" + id + ".html"; var response = new HttpResponseMessage(); response.Content = new StringContent(File.ReadAllText(path)); response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); return response; } var path2 = "C:/Users/user/Project/Login.html"; var response2 = new HttpResponseMessage(); response2.Content = new StringContent(File.ReadAllText(path2)); response2.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); return response2; }
[AcceptVerbs("GET")] [AllowAnonymous] [Route("ManageAccount/{id}")] public HttpResponseMessage ManageAccount(string id) { if (! String.IsNullOrEmpty(id)) { var path = "C:/Users/user/Project/" + id + ".html"; var response = new HttpResponseMessage(); response.Content = new StringContent(File.ReadAllText(path)); response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); response.Headers.Add("Accept-Ranges", "bytes"); return response; } var path2 = "C:/Users/user/Project/Login.html"; var response2 = new HttpResponseMessage(); response2.Content = new StringContent(File.ReadAllText(path2)); response2.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); return response2; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)