Pass Authentication to Async Web Service Method Call

B

Bob

I have a web service that has been running nicely for four years now. I need
to update the Web Application that consumes it to use Silverlight. I don't
much want to write the web service. The service web methods pass credentials
in the SOAP header.

So the old app goes something like this:-

MyService srv = new MyService();
MyService.MyCredentials cred = new MyService.MyCredentials();
cred.UserName="foo";
Cred.Password = "bar";
MyService.MyCredentialsValue = cred;
string[] results = MyService.GetMyData();

Now we are in a Silverlight Page and I have to use the async methods
something like this:-

MyService srv = new MyService();
srv.GetMyDataCompleted+= new GetMyDataCompleteHandler...;

There is no MyService.MyCredentialsValue.

So is there a way to pass the header credential info to the method?
 
B

Bob Barrows

Bob said:
I have a web service that has been running nicely for four years now.
I need to update the Web Application that consumes it to use
Silverlight. I don't much want to write the web service. The service
web methods pass credentials in the SOAP header.

So the old app goes something like this:-

MyService srv = new MyService();

There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice), but this is a classic (COM-based) asp newsgroup.
ASP.Net is a different technology from classic ASP. While you may be
lucky enough to find a dotnet-savvy person here who can answer your
question, you can eliminate the luck factor by posting your question to
a newsgroup where the dotnet-savvy people hang out. I suggest

microsoft.public.dotnet.framework.aspnet.

There are also forums at www.asp.net where you can find a lot of people
to help you.

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top