Is there a way to create WCF proxy objects on the fly without using codedom? By on the fly I mean during runtime. So lets say I have a smart client application that is accessing a WCF service. The Data Contract for the WCF service is changed while the client is running. I want to dynamically create a new proxy object that reflects the changed data contract.
相关问题
- How to make a .svc file write to asp.net Trace.axd
- WCF Service Using Client Certificates Requires Ano
- WCF error with net.tcp "The service endpoint faile
- WCF Service Reference Support Files Not Updating
- Mathjax not rendering TEX formulas dynamically fro
相关文章
- WCF发布Windows服务 POST方式报错 GET方式没有问题 应该怎么解决?
- Angular Material Stepper causes mat-formfield to v
- XCopy or MOVE do not work when a WCF Service runs
- Could not find default endpoint element that refer
- The 'DbProviderFactories' section can only
- Angular CLI: Proxy websocket with proxy.conf.json
- Do I need to expose a constructor in a WCF DataCon
- OSX proxy issue with homebrew install
Be careful about doing too much stuff on the fly. Even using reflection it might become too easy to couple your Client/Proxy/Service/Contract together too much.
Creating manual proxies and adding them as a reference to your client is a fantastic idea.
I came up with a solution, using a shared assembly for contracts and endpoint interfaces.
So The Projects Would Be
Client With Proxy
public class YourProxy : ClientBase {}
You should read this article: WCF the Manual Way… the Right Way
And look into using the ChannelFactory class. You are going to have alot of reflection to create and invoke the members if the contract changes on the fly but I can't think of any reason you shouldn't be able to do it.