Pass Authentication to Async Web Service Method Call

Discussion in 'ASP General' started by Bob, Jun 30, 2009.

  1. Bob

    Bob Guest

    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?

    --
    Bob
    Bob, Jun 30, 2009
    #1
    1. Advertising

  2. Bob

    Bob Barrows Guest

    Bob wrote:
    > 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
    --
    HTH,
    Bob Barrows
    Bob Barrows, Jun 30, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Riyaz
    Replies:
    2
    Views:
    291
    Daniel Pitts
    Nov 17, 2007
  2. VR

    ending an async call to a web service

    VR, Sep 11, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    186
  3. Steven
    Replies:
    0
    Views:
    347
    Steven
    Nov 30, 2005
  4. Anthony Hunt

    Web service Async call doesn't work on Win 2008/IIS7 Ideas?

    Anthony Hunt, Mar 20, 2009, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    885
    Anthony Hunt
    Mar 20, 2009
  5. K. R.

    call with async method

    K. R., Nov 17, 2007, in forum: Ruby
    Replies:
    6
    Views:
    98
    Robert Klemme
    Nov 19, 2007
Loading...

Share This Page