You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on modifying this library to be a smaller DLL that I can then call from a VB.Net project and I think I've figured this out. In the XmlObixClient.cs file, under the public XmlObixClient, you need to add in some optional parameters for username and password then use them. Something like this:
public XmlObixClient(Uri ObixLobbyUri, string userName = null, string password = null)
: base(ObixLobbyUri)
{
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
System.Net.Http.Headers.AuthenticationHeaderValue authHeader = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(encoding.GetBytes(string.Format("{0}:{1}", userName, password))));
WebClient = new HttpClient();
WebClient.DefaultRequestHeaders.Authorization = authHeader;
ErrorStack = new ObixErrorStack();
}
This got me by the default "Unknown Error: 7" I kept getting although now I'm getting a "The XML parser could not understand the XML document provided" issue....
I have the same issue... need to get info from the HVAC system but how to pass credentials? Connect gets redirected to login page.
The text was updated successfully, but these errors were encountered: