简体   繁体   中英

Powershell module not calling CustomSoapExtension

I have a custom dll (CustomSoapExtension.dll) that I use in another webservice client (a web page) that inserts a username/password into the soap stream for authentication. It has been awhile since I created that project so I am not sure I completed all of the appropriate steps to get it working in this powershell module.

I have added the reference to the project. I have added this section to the app.config

    <system.web>
    <webServices>
        <soapExtensionTypes>
            <add type="CustomSoapExtension.CustomSoapExtension,CustomSoapExtension" group="High" priority="1"/>
        </soapExtensionTypes>
    </webServices>
</system.web>

I am calling the webservice, but the custom header information is not present. I'm sure it is something simple that I overlooked.

C#, Visual Studio 2k8

thanks in advance.

If you're loading this DLL as a binary module in powershell, the app.config needs to be powershell.exe.config alongside the powershell.exe executable. This is impractical for most scenerios as powershell's home folder is under the windows root and the config would also be shared amongst all users of the machine. Consider adding the soap extension programmatically in the module binary instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM