I have added reference to WCF Service in my client asp.net website.
Right now, I am just instantiating WCF Service at every service method call as:
TemplateServiceClient objTemplateService = new TemplateServiceClient();
objTemplateService.MethodCall();
I am not sure about the performance down due to above.
If it is going to be a performance hit, Can you suggest me a better approach to call my service methods.
Thank you!
The only way to know about performance is to test it, so if you’ve any concerns, you should do that.
It’s hard to know without knowing what you’re doing and how it will be used.
A web service client is just another object so you can do all the usual things:
Personally, I tend to end up with the second for most things I do but that fits my usage profile.