Howto modify HTTP Headers in XML Webservice

N

Nils

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top