Dvblink Remote API

DVBLink Remote API clients and tools

Re: Dvblink Remote API

Postby Oberon » Mon Jul 29, 2013 10:05 pm

ralphFFM wrote:Did anyone ever figure this out?

I too am coding in .NET and am having the same Problem.
Connecting with the remote API returns status code 401. I am setting the request header Authorization
to Basic and am supplying the User:Password.

Example:
web_client.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes("user:admin")));

or

string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("user:admin"));
web_client.Headers[HttpRequestHeader.Authorization] = string.Format("Basic {0}", credentials);

Why don't you use the already existing library:
viewtopic.php?f=61&t=18012
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am


Re: Dvblink Remote API

Postby ralphFFM » Tue Jul 30, 2013 7:53 am

Thanks Oberon, the reason I am not using the library you provided is because of the Silverlight requirement.
I want to stick with pure .Net.

I managed to solve my 401 (authentication) issue.

It seems that the .Net System.Net.WebClient cannot connect correctly.
I switched to the .Net System.Net.WebRequest and it works perfect :D
ralphFFM
 
Posts: 19
Joined: Sat Jul 27, 2013 12:53 pm

Re: Dvblink Remote API

Postby phonk » Sun Feb 21, 2016 11:39 am

Hi, can you post your code, which solved the 401 error ? I tried WebRequest, but no success.
phonk
 
Posts: 37
Joined: Wed Jun 16, 2010 9:56 am

Previous

Return to Development corner

Who is online

Users browsing this forum: No registered users and 3 guests

cron