Thursday, October 11, 2018

How to add Basic authentication to a web request


Below is sample C# code where we can inject an Basic Authorization header into a HTTP request


request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(username + ":" + password)));

No comments:

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...