HTTP Basic authentication requies everything after “Basic “ to be Base64-encoded, so try
request.Headers["Authorization"] = "Basic " +
Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo));
More Related Contents:
- Making a cURL call in C#
- Token based authentication in Web API without any user interface
- How to get the logon SID in C#
- The HTTP request is unauthorized with client authentication scheme ‘Ntlm’ The authentication header received from the server was ‘NTLM’
- Prevent from displaying of Windows Security window
- Built-in helper to parse User.Identity.Name into Domain\Username
- .NET 4.5 Bug in UserPrincipal.FindByIdentity (System.DirectoryServices.AccountManagement)
- How to create an object during runtime in .net
- Creating a DateTime in a specific Time Zone in c#
- What’s the best way of implementing a thread-safe Dictionary?
- How can I send emails through SSL SMTP with the .NET Framework?
- How to get the index of an element in an IEnumerable?
- Get size of file on disk
- Json.NET serialize object with root name
- C# “internal” access modifier when doing unit testing
- When to use IList and when to use List
- Async/Await vs Threads
- How to serialize/deserialize simple classes to XML and back
- Fastest way to add new node to end of an xml?
- How to Get XML Node from XDocument
- How to Draw a Rounded Rectangle with WinForms (.NET)?
- No Source available
- Using Graphics.DrawImage() to Draw Image with Transparency/Alpha Channel
- GC.Collect() and Finalize
- Possible pitfalls of using this (extension method based) shorthand
- Linq style “For Each” [duplicate]
- How to properly and completely close/reset a TcpClient connection?
- ASP.NET Core 1.1 runs fine locally but when publishing to Azure says “An error occurred while starting the application.”
- Reading XML with an “&” into C# XMLDocument Object
- How to get DPI in C# .NET?