HTTP status 401: Unauthorized

Jan 29, 2010 at 6:06 AM

I found the QryFrm.vb ConnectToService should change the NetworkCredential contructor to give domain name as 3rd parameter, or I can't use it to connect to a remote server without stored username/password.  For your reference.

'2010-01-28 by Jeffrey, pass domain as 3rd parameter
If logonDlg.Username.ToString().Contains("\") Then
     Dim p As String() = logonDlg.Username.ToString().Split("\")
     sws.Credentials = New System.Net.NetworkCredential(p(1), logonDlg.Password, p(0))
Else
     sws.Credentials = New System.Net.NetworkCredential(logonDlg.Username, logonDlg.Password)
End If