Client found response content type of '', but expected 'text/xml'

Discussion in 'ASP .Net Web Services' started by Vish Ramachandran, May 9, 2004.

  1. I am trying to run a web service project with multiple web services. The problem is that this works sometimes, and sometimes it does not work. I've worked on this problem for nearly 3 days now, and still no solution :( The exception is

    An unhandled exception of type 'System.InvalidOperationException' occurred in system.web.services.dl
    Additional information: Client found response content type of '', but expected 'text/xml'

    When I try to run the web service from the project on the Internet Explorer test page, it runs without any problem, but then if I run it from another application using a web reference, it does not work

    I tried creating the project all over again by copying the code for the web services exactly from the previous code, it worked initially, but then after a few minutes it started giving the same error agin

    I suspected that it is the namespace of the services which is probably giving the problem, so I commented the WebService attribute for all web service classes, and then tried. It worked! Just to make sure that this was the problem, I reverted back, and it didnt work! Really satisfied that I solved the problem, I commented back the attributes and tested it again. IT DID NOT WORK

    Now I am totally stuck not knowing what to do. Can anyone please help me

    Thanks a lot in advanc
    Vis
    Vish Ramachandran, May 9, 2004
    #1
    1. Advertising

  2. Vish Ramachandran

    Martin Boehm Guest

    Hi,

    did you update your web reference after changeing the webservice namespace?

    Check the file reference.cs if the correct namespace is in there. If it's
    not in there leave the file open in the editor and then refresh your web
    reference. There seems to be a bug in VS.Net when updating a web reference,
    but leaving the reference.cs file open in the editor will cause the editor
    to reload the file.

    best regards
    Martin

    "Vish Ramachandran" <vish r at a s u period ed u> schrieb im Newsbeitrag
    news:...
    > I am trying to run a web service project with multiple web services. The

    problem is that this works sometimes, and sometimes it does not work. I've
    worked on this problem for nearly 3 days now, and still no solution :( The
    exception is:
    >
    > An unhandled exception of type 'System.InvalidOperationException' occurred

    in system.web.services.dll
    > Additional information: Client found response content type of '', but

    expected 'text/xml'.
    >
    > When I try to run the web service from the project on the Internet

    Explorer test page, it runs without any problem, but then if I run it from
    another application using a web reference, it does not work.
    >
    > I tried creating the project all over again by copying the code for the

    web services exactly from the previous code, it worked initially, but then
    after a few minutes it started giving the same error agin.
    >
    > I suspected that it is the namespace of the services which is probably

    giving the problem, so I commented the WebService attribute for all web
    service classes, and then tried. It worked! Just to make sure that this was
    the problem, I reverted back, and it didnt work! Really satisfied that I
    solved the problem, I commented back the attributes and tested it again. IT
    DID NOT WORK!
    >
    > Now I am totally stuck not knowing what to do. Can anyone please help me?
    >
    > Thanks a lot in advance
    > Vish
    >
    >
    Martin Boehm, May 26, 2004
    #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. Damon Payne
    Replies:
    0
    Views:
    9,118
    Damon Payne
    Mar 8, 2005
  2. Robert Rotstein
    Replies:
    0
    Views:
    2,793
    Robert Rotstein
    Dec 21, 2005
  3. Jesús Bosch
    Replies:
    1
    Views:
    13,049
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 3, 2006
  4. powerranger
    Replies:
    0
    Views:
    132
    powerranger
    Jul 26, 2004
  5. Søren M. Olesen
    Replies:
    4
    Views:
    525
    Dan Rogers
    Feb 15, 2005
Loading...

Share This Page