7

I'm trying to write a soap extension. But the framework is not loading it.

I've added to the web.config

<webServices>
    <soapExtensionTypes>
        <add group="High" priority="1" type="Lisa.Admin.SoapExceptionExtension,Lisa.Admin" />
    </soapExtensionTypes>
</webServices>

and even if I change the type to some bullshit It does not cast an exception.

Thorgeir
  • 3,960
  • 3
  • 24
  • 20

1 Answers1

12

I have been having a problem with similar behaviour but I don't know if it's exactly the same.

When writing, compiling and applying my SoapExtension, in web.config and on my web method, everyting seems to work correctly, but when accessing my web service my extension was not being used. I think I just figured this one out.

It looks like the extension is not being used when making requests to the web service through the test pages (via a browser). If you, on the other hand, add a web reference to a console application the extension is being called.

Hope this is your problem and my answer will help you.

Edit:

Just read a little more; the reason seems to be that when using the test-pages, the HTTP-POST protocol is being used to access the web methods and the SOAP protocol is not involved, ALAS SoapExtensions are not being called.

Alfred B. Thordarson
  • 4,460
  • 8
  • 39
  • 37
  • If I remember correctly. The problem was I was using the Javascript interface of the web-service and therefore not using SOAP and not loading any SOAP-extensions. – Thorgeir Jul 13 '10 at 09:30
  • Thank you Alfred. I had this exact situation and it was driving me insane. I moved my WS calls to a winform application instead of the asmx test page and it worked perfectly. – Chris Porter Dec 30 '10 at 02:02