I need to use a SoapExtension
subclass (which I have created), but it seems that this class can only be initialized through a web.config
file. I have read that it should be possible through app.config
file, but I don't know how to do it that way.
Problem: I don't have a web.config
file in my project.
So I created one manually with the following content:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type="MyNameSpace.MySoapExtension,MyAssemblyFileName" priority="1"/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
Despite breakpoints dispatched in each SoapExtension methods, nothing happens at runtime, it seems that it is never initialized nore called. My SoapService initializes ok, but without any extension.
I guess that creating the web.config file manually may not be enough for it to be taken into account, so I am wondering how to properly configure my app to have a web.config file in order to use my SoapExtension. It should go and initialize my class, processMessage, and chainStream stuff.
Note: This is my first ever SoapExtension implementation, so I am not really sure about what I am doing.