2013-02-11 66 views
2

我想用WCF測試客戶端調用Web服務,但Web服務需要身份驗證。WCF測試客戶端和身份驗證

如何登錄並通過WCF Test Client調用它(我試圖從瀏覽器獲取它,然後調用但不起作用)。我可以使用SOAP UI,但是如果可能的話,我想用WCF Test Client來完成。也許改變WCF配置?

Error: Cannot obtain Metadata from If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: Metadata contains a reference that cannot be resolved: ''. The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm=""'. The remote server returned an error: (401) Unauthorized.HTTP GET Error URI:
There was an error downloading ''. The request failed with HTTP status 401: Unauthorized.

回答

0

你有沒有在你的配置指定mex endpoint

如果您遇到安裝問題,建議您通過Codeplex applications scenarios來讀取,以確保您已正確設置服務和WCF測試客戶端。

如果您需要任何幫助,請發佈配置和一些示例代碼。

編輯:

這些鏈接可能對這個問題提供一些見解:

WCF - Cannot obtain Metadata, but works when the XML Endpoint is removed?

Cannot obtain Metadata from WCF service when using Microsoft WCF Test Client.

+2

我談論這個http://msdn.microsoft。 com/library/bb552364.aspx – 2013-02-18 13:55:22

+0

我添加了一些可能有助於解決問題的鏈接 – Tanner 2013-02-18 14:07:44