我创建了Silverlight应用程序使用的WCF服务(去年),它没有元数据(没有IMetadataExchange端点)。WCF:是否需要元数据才能使用WCF服务?
现在我需要WCF服务被Windows控制台应用程序使用,并且我无法添加对服务的引用。我点击“添加服务”发现解决方案的服务,选择“必需”服务并点击“确定”按钮。
而不是服务引用创建我得到了以下错误:
The HTML document does not contain Web service discovery information. Metadata contains a reference that cannot be resolved: 'http://localhost/EnrollmentService.svc'. There was no endpoint listening at http://localhost/EnrollmentService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote server returned an error: (404) Not Found. If the service is defined in the current solution, try building the solution and adding the service reference again.
我应该增加对WCF服务也应该是另一种解决方案元数据支持工作?
请指教。
所以我需要自己生成这些代理?不,我会更好地添加元数据支持...但是,谢谢你的回答 – Budda 2011-01-10 15:09:07