Two Web Services using same NetworkCredential?

Discussion in 'ASP .Net Security' started by wgo, Oct 14, 2003.

  1. wgo

    wgo Guest

    Hi,

    I've been trying to figure this out all day and thought someone here might
    be able to help.

    I have a Windows form app that's using windows basic authentication to
    access two different web services. Each web service uses a different
    username and password. When I access the first web service everything is
    fine, but when I access the second web service it's using the username and
    password from the first web service.

    I'm making an instance of NetworkCredential, assigning the correct username
    and password and then assigning it to the web service proxy before making
    each call.

    If I switch the order of the calls the first always works and the second
    fails because it has the username and password of the first one.

    I'm verifying the username received by the web service by using
    User.Identity.Name() and Thread.CurrentPrincipal.Identity.Name in the web
    service. Both web services are running on the same server.

    Does anyone know what's going on here?

    Thanks in advance.
     
    wgo, Oct 14, 2003
    #1
    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. Jay Douglas
    Replies:
    4
    Views:
    723
    Jay Douglas
    Mar 6, 2004
  2. IveCal

    NetworkCredential

    IveCal, Apr 17, 2006, in forum: Java
    Replies:
    6
    Views:
    4,288
    Oliver Wong
    Apr 20, 2006
  3. =?Utf-8?B?WUs=?=
    Replies:
    3
    Views:
    5,069
    *Busy*
    Mar 24, 2010
  4. Carlton858

    using System.Net.NetworkCredential class

    Carlton858, May 18, 2004, in forum: ASP .Net Security
    Replies:
    7
    Views:
    430
    Carlton Nettleton
    May 25, 2004
  5. Patrick Fogarty

    Authentication not working on HTTP-POST using NetworkCredential

    Patrick Fogarty, Aug 25, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    245
    Feroze [MSFT]
    Aug 27, 2003
Loading...

Share This Page