views:

976

answers:

2

Hello, I'm using a SOAP Webservice (ASMX) which is HTTP Auth secured in my Silverlight Application. How can I pass my Credentials to the Webservice?

        bb_webservice = new BlackberryWSSoapClient();
        bb_webservice.GetLatestLocationsCompleted += new EventHandler<GetLatestLocationsCompletedEventArgs>(ws_proxy_GetLatestLocationsCompleted);
        bb_webservice.GetLatestLocationsAsync(0);

The credentials property isn't provided: http://dl.getdropbox.com/u/357576/ws.jpg

Any Help would be appreciated. Thanks.

rAyt

+1  A: 

You can use the credentials property and pass a new NetworkCredential object:

bb_webservice = new BlackberryWSSoapClient();
bb_webservice.Credentials = 
       new System.Net.NetworkCredential("username","password","domain");
ichiban
That's the strange thing. Crendentials isn't provided http://dl.getdropbox.com/u/357576/ws.jpg
Henrik P. Hessel
A: 

This is "fixed" in Silverlight 3 Beta. Credentials property is there yet again.

Henrik P. Hessel