SoapExtension not loading

 ̄綄美尐妖づ 提交于 2019-12-21 01:13:30

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/1626160/soapextension-not-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!