我創建了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