How to pass a service header when calling a WCF Service on a WinRT app -


i got 2 projects on solution - console application project , winrt project.

i need consume wcf service, can through console application using following lines:

static void main(string[] args) {                 var client  = new servicereference1.comeandgoclient("basichttpbinding_icomeandgo");     var header = new servicereference1.serviceheader{ accountid = "a1", deviceid = "d1" };     var res = client.getemployees(ref header, ""); } 

the problem - i'm not finding out how can send same service header (accountid , deviceid) when calling same method through winrt app.

var client = new servicereference1.comeandgoclient(servicereference1.comeandgoclient.endpointconfiguration.basichttpbinding_icomeandgo);  public async task loaddata() {     var sessions = await client.getemployeesasync(""); } 

note: on winrt project don't have getemployeesasync method gets serviceheader parameter have getemployees on console application project. had added same service reference both projects, though.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -