How to call sessionMgr api

RESTful knowledge exchange

How to call sessionMgr api

Veeam Logoby jerny_huang » Wed Aug 06, 2014 9:34 am

I call sessionMgr api with C#, but failed. I need to help.

Code: Select all
public static void SetBasicAuthHeader(String userName, String userPassword)
            var req = WebRequest.Create("");
            string authInfo = userName + ":" + userPassword;
            authInfo = Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo));
            req.Headers["Authorization"] = "Basic " + authInfo;
Posts: 8
Liked: never
Joined: Wed Aug 06, 2014 8:11 am
Full Name: Jerny Huang

Re: How to call sessionMgr api

Veeam Logoby v.Eremin » Wed Aug 06, 2014 10:29 am

And what errors you had? I'm not that familiar with C#, but shouldn't a web request be declared as a POST one? Something like webRequest.Method = "POST"? Thanks.
Veeam Software
Posts: 14052
Liked: 1052 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Return to RESTful API

Who is online

Users browsing this forum: No registered users and 1 guest