C
cj
Hi,
I wrote a custom HttpModule for my ASP.NET XML web service so that I could
do custom user authentication via SOAP headers. I have this working except
for one problem: When I throw SoapExceptions from my HttpModule, the
response is sent back to the client as html instead of xml.
This results in the client throwing an exception that the content type is
'text/html', not 'text/xml':
"Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'."
If I throw a SoapException from the web service code itself, it works fine.
Unfortunately, the HttpModule has more information about the error, and I
really don't want to enter the web service code if the user is not
authenticated - e.g. I would like to throw an exception!
Anyone know why this might happen? Do I have to write my own custom SOAP
envelope code or something?
Thanks,
cj
I wrote a custom HttpModule for my ASP.NET XML web service so that I could
do custom user authentication via SOAP headers. I have this working except
for one problem: When I throw SoapExceptions from my HttpModule, the
response is sent back to the client as html instead of xml.
This results in the client throwing an exception that the content type is
'text/html', not 'text/xml':
"Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'."
If I throw a SoapException from the web service code itself, it works fine.
Unfortunately, the HttpModule has more information about the error, and I
really don't want to enter the web service code if the user is not
authenticated - e.g. I would like to throw an exception!
Anyone know why this might happen? Do I have to write my own custom SOAP
envelope code or something?
Thanks,
cj