Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

Login Issue - The given header was not found

$
0
0

Hi I'm new to .net sdk vCloud, i'm trying to create a webservice to connect to vCloud via API.

I downloaded code example on GitHub - rdbwebster/vcdapisamples: Vmware VCD .Net C# API examples

 

Tried a very simple code below :

 

vCloudClient client = new vCloudClient("{param1}", com.vmware.vcloud.sdk.constants.Version.V5_5);

client.Login({param2}, {param3});

 

The data that i put it into above parameters are as per https://dl.dropboxusercontent.com/u/20066282/vCloud%20Q%26A.png

After i run the code it got me error "The given header was not found".

I'm not sure if the code are suppose to put in "Accept" in header with value as "application/*+xml;version=1.5" to make sure i can login

or the parameter that i put in are wrong, please help !!

 

The detail of my exception message are :

{com.vmware.vcloud.sdk.utility.VCloudRuntimeException: The given header was not found. ---> System.InvalidOperationException: The given header was not found.

   at System.Net.Http.Headers.HttpHeaders.GetValues(String name)

   at com.vmware.vcloud.sdk.utility.RestUtil.Login(vCloudClient client, String url, HttpRequestHeaders authHeader)

   --- End of inner exception stack trace ---

   at com.vmware.vcloud.sdk.vCloudClient.Login(String userName, String password)

   at Com.Vmware.Vcloud.Sdk.Samples.ListAllvApps.Main(String[] args) in d:\Downloads\Binary\VMware-vCloudDirector-.NetSDK-5.5.0\Samples\ListAllvApps\ListAllvApps.cs:line 90}


Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>