I am working on a Base WCF Service- Client WCF service - Consumer Base Wcf servcie model as following:
In this model, I have created a Base WCF service and created 1 WCF service i.e; ClientWCFService and 1 ASMX service i.e; ClientASMXservice using the BaseWCFServiceProxy.cs the Proxy class of Base WCF Service using SVCUtil.exe.
The ClientWCFService and ClientASMXservice are working fine in StandAlone environment. Now, I created a Consumer Console Application using the same proxy class BaseWCFServiceProxy.cs to access both of the ClientWCFService and ClientASMXservice using the BaseWcfService class.
As per the OOP rules, BaseWcfService class is the base class for the ClientWCFService and ClientASMXservice and i can access these Services using the Base service class constructor.
The service calls are as following: for ClientWCFService
ModelWcfServiceContractClient _client = new ModelWcfServiceContractClient("IModelWcfServiceContract","http://localhost:64242/ClientWCFServiceWcfUsingSVCProxy.svc");
for ClientASMXservice
ModelWcfServiceContractClient _client = new ModelWcfServiceContractClient("IModelWcfServiceContract","http://localhost:64396/ClientASMXServiceWcfUsingSVCProxy.asmx");
The Consumer Console application is building fine, but at run time while initializing the ModelWCFServiceContractClient object, it throws the InvalidOperation Exception as :
Could not find endpoint element with name 'IModelWcfServiceContract' and contract 'IModelWcfServiceContract' 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 name could be found in the client element.
I have tried using different endpoints for every type of service to resolve this issue but could not get success.
A faster response would be Appreciated. Also please don't help me by just clearing spelling mistakes because it will waste my time to read the Alert that would be generated due to the clearing spell mistakes. Time is critical for me..
Thanks