Victor
Victor

Reputation: 1271

Using a WCF Reference in a DLL used by Classic ASP

I created a .NET DLL library which is COM-visible for the Classic ASP to use. I referenced a WCF service in the library and whenever I try to call the DLL from the classic ASP, I receive the following error:

Could not find default endpoint element that references contract 'ContractName' 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.

Now, I set the reference to be internal access level. I noticed that VS created a DLL.config file with the service endpoint information, so I put the config file in the assembly folder for this DLL, but no luck.

Any idea how to use WCF endpoint reference?

Upvotes: 1

Views: 210

Answers (1)

Victor
Victor

Reputation: 1271

SOLVED

All I needed to do is to create a BasicHTTPBinding and provide an endpoint address on the fly.Then create a new instance of the web service using the created binding and endpoint address.

Upvotes: 1

Related Questions