2
votes

I have a question regarding WCF proxy creation, it may be of beginner level but have to ask. I created a proxy to a wcf service in my client using VS add service reference. Now because some methods in that service might take longer to execute and block all the proxy connection available i want to make call to each method using different proxy of the same service from my client.

Now the questions are:

  1. Is my approach right, i mean will this solve my purpose?
  2. For using different proxies do i need to add multiple service references with different names?
  3. As a option to point 2 can i just add service reference once and replicate the same endpoint in config with different names? So every time i want to create a new proxy i pass in the name of a different endpoint to the same service in the constructor of the proxy?
  4. Also is (multiple proxies = multiple instance of a proxy)?

Regards

2

2 Answers

0
votes

I think the best approach is to use an asynchronous operations for the single proxy instance. It's like the web browser - you can see the same webpage in many tabs. All of them are working independently but use the same endpoint resource. Try read something like this

0
votes

You can use a single Service reference with a single configuration and a single endpoint. To call multiple methods on the service in parallel, you can create multiple proxy instances in different threads, or within different methods marked as async.