Howto modify HTTP Headers in XML Webservice

Discussion in 'ASP .Net Web Services' started by Nils, Feb 19, 2007.

  1. Nils

    Nils Guest

    Hello,
    im developing a SOAP Webservice in C#.NET with Visual Studio 2005.
    The client is a Flex/Flash application.
    Everything works fine unless an exception is raised.
    Then the webservice returns a SOAP Fault as follows:

    HTTP/1.1 500 Internal Server Error
    Server: Microsoft-IIS/5.1
    Date: Thu, 15 Feb 2007 10:16:44 GMT
    X-Powered-By: ASP.NET
    X-AspNet-Version: 2.0.50727
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Content-Length: 632

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>my errormessage</faultstring>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>

    The HTTP Status Code '500' meets the SOAP specifications but a Flash/Flex
    application is not able to access the qualified error message if a HTTP
    Status Code '500 Internal Server Error' is generated.

    Now i have to change the HTTP Status Code to '200 OK' in this special case.

    How can i do this using a System.Web.Services.WebService.

    BR
    Nils
     
    Nils, Feb 19, 2007
    #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. Replies:
    7
    Views:
    10,418
    erics44
    Jan 8, 2010
  2. Replies:
    4
    Views:
    1,068
    Gibble
    May 10, 2007
  3. Ian
    Replies:
    2
    Views:
    1,981
  4. Scott

    WebService To WebService HTTP Connection Limit

    Scott, Jan 31, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    649
    Scott
    Feb 1, 2006
  5. Mark
    Replies:
    1
    Views:
    147
    David Efflandt
    Sep 12, 2003
Loading...

Share This Page