Service reference configuration in app.config is not found when dll is deployed.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
hi. I'm trying to implement a new payment method, and I have gone as far as implementing the IPaymentMethod interface.
my class is ok, and loads correctly, but when the dll deployed, it can't find the configuration of the service reference which was saved in app.config under the class library.
the build output has created a .dll.config file, and I tried copying it to bin folder, no luck.
some other payment methods do also have app.config file, but no .config file is copied to bin folder. I wonder how they work.
anyway, this is the error I receive:

Could not find default endpoint element that references contract 'MyCustomPaymentService.IPaymentGateway' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
12 年 前
a temporary solution was to copy app.config contents to web.config of the web application
12 年 前
To keep things pluggable, I wouldn't rely on anything being in the web.config

http://msdn.microsoft.com/en-us/library/ms734681.aspx#Y55

Use that technique to define your protocol in code.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.