I have the following ScanServer() action method inside my asp.net mvc web application, which exposes a WebService :-
[HttpPost] public async Task<ActionResult> ScanServer(string FQDN) { string ValidToken = System.Web.Configuration.WebConfigurationManager.AppSettings["Token"]; tokenfrom = Request.Headers.Get("Authorization"); if (tokenfrom != ValidToken ) { return new HttpStatusCodeResult(403, "request failed"); now as shown on the above method, i am extracting the authorization token from the Post request and compare it with the valid token stored inside the web.config..now i am calling the ScanServer() action method as follow from external systems :-
using (WebClient wc = Go to the complete details ...