title: How can I launch a URL in .NET with an Authorization header?
body: <p>We are creating a plug-in to Ellie Mae's Encompass system for a client. </p>
  
  <p>This particular plugin just has one button, which when clicked launches a URL and passes in the userid of the currently logged in Encompass user. This is all very straight forward using the following code... </p>
  
  <pre><code>Private Sub btnProductSearch_Click(sender As Object, e As EventArgs) 
  Handles btnProductSearch.Click
      Try
          Dim cliid = EncompassApplication.Session.ClientID,
              unm As String = EncompassApplication.CurrentUser().ID,
              url As String = GetServiceUrl(cliid)
  
          If String.IsNullOrEmpty(url) Then
              MsgBox("No matching URL found for current Encompass Client ID.")
          Else
              Process.Start(url &amp; unm)
          End If
      Catch ex As Exception
          MsgBox(ex.Message)
      End Try
  End Sub
  </code></pre>
  
  <p>Now for the fun part... they don't want the user to have to log in to the URL being launched, but want us to pass the authentication to the URL via an <code>Authorization</code> HTTP header. </p>
  
  <p>This would be easy enough if we were doing our own web request in code, something like the following: </p>
  
  <pre><code>    Dim wreq = HttpWebRequest.CreateHttp(url)
      wreq.Method = "POST"
  
      Dim authBytes As Byte() = Encoding.UTF8.GetBytes("EncodedInfoHere".ToCharArray())
      wreq.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(authBytes))
      wreq.ContentType = "application/json"
  </code></pre>
  
  <p>However, we are not doing a code web request, but rather are simply launching the URL via <code>Process.Start</code>. Is there any way while doing this to pass the <code>Authorization</code> header?</p>