Error when setting Credentials property of an ASMX

Discussion in 'ASP .Net Web Services' started by AC [MVP MCMS], Dec 20, 2005.

  1. I have a console app that is working with a Web Service on another remote
    box. Suddenly when I try to assign the DefaultCredentials from the
    CredentialCache to the Credentials property of the Web Service, I'm getting
    the following error:

    - An unhandled exception of type 'System.Xml.XmlException' occurred in
    system.xml.dll
    - Additional information: System error.

    Now, the wierd stuff.
    1) My app is still being developed... but when I've tested debug builds, it
    works about 90% of the time (it = assigning the Credentials property)...
    sometimes this error would pop up, kill the process, but all I'd have to do
    is just rerun it and it would work fine. Chalked it up to one of those "I'll
    figure this out later" and listed it as a bug.
    2) The statement is wrapped in a try-catch, but it's breaking on the line
    that's assigning the value. I've tried to put a breakpoint and step into it,
    but no luck, once it hits that line, it blows up. I've even tried to trap
    the exception within the CATCH, but it won't get that far.
    3) I've made some changes to the code that handles the response back from
    the Web Service, but that code isn't called until after the Credentials are
    set. Since I made these changes, the error happens every time now.

    I've rolled back my changes, even commented out everything after I set the
    Credentials, but the error still keeps popping up. Hard to isolate it or
    even track down what the inner exception is because I can't trap the
    Exception.

    Ideas?

    --
    -AC [MVP MCMS]
    http://www.andrewconnell.com
    http://www.andrewconnell.com/mvp
     
    AC [MVP MCMS], Dec 20, 2005
    #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. Jamie
    Replies:
    4
    Views:
    14,111
    Jamie
    Mar 1, 2004
  2. tshad

    Setting credentials

    tshad, Jan 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    371
    tshad
    Jan 14, 2005
  3. Alex Hunsley
    Replies:
    1
    Views:
    6,418
    Alex Hunsley
    May 28, 2004
  4. kevin  cline
    Replies:
    2
    Views:
    2,445
    Gilbert Rebhan
    Jul 26, 2008
  5. Nathan Sokalski
    Replies:
    25
    Views:
    1,505
    Nathan Sokalski
    Mar 4, 2010
Loading...

Share This Page