2012-11-02 26 views
1

我創建了一個.NET DLL庫,它對於要使用的經典ASP是COM可見的。我引用的庫中的WCF服務,每當我打電話從傳統的ASP的DLL,我收到以下錯誤:在經典ASP使用的DLL中使用WCF引用

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.

現在,我設置的參考是內部的訪問級別。我注意到VS創建了一個包含服務端點信息的DLL.config文件,所以我把配置文件放在這個DLL的程序集文件夾中,但沒有運氣。

任何想法如何使用WCF端點引用?

回答

1

解決

所有我需要做的是建立一個BasicHTTPBinding並提供有關fly.Then端點地址創建使用創建的綁定和端點地址的網絡服務的新實例。