2009-04-23 73 views
0

我試圖「添加服務引用」SharePoint Web服務(例如「http://cogent-moss/_vti_bin/Webs.asmx」),但我有麻煩。我好像總是出現此錯誤:Visual Studio 2008「添加服務參考」Sharepoint:401和端口號

The document at the url http://cogent-moss/_vti_bin/Webs.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from ' http://cogent-moss/_vti_bin/Webs.asmx ' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'DISCO Document' is 'Root element is missing.'. - Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. Metadata contains a reference that cannot be resolved: ' http://cogent-moss/_vti_bin/Webs.asmx '. The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'. The remote server returned an error: (401) Unauthorized. If the service is defined in the current solution, try building the solution and adding the service reference again.

我已經沖刷網頁的這一解決方案,其中大部分是運行時問題的解決方案。我只想讓Visual Studio 2008爲我生成代理類。

我覺得奇怪的是,如果我嘗試的是同樣的東西,除了指向「http://cogent-moss:8888/_vti_bin/Webs.asmx」,它一切正常。這兩個IIS Virtual Server都是由SharePoint配置的Sharepoint Site Collections,並且都是爲Windows身份驗證配置的。當我指定一個端口號時,發生什麼事會使它工作,但是當我轉到端口80的默認值時,不會發生這種情況。

回答

0

聽起來好像您在SharePoint中擴展了Web應用程序,其中端口80擴展到端口8888,而端口80允許匿名,但端口8888需要Windows身份驗證。你有沒有檢查IIS管理器,看看是否是這種情況?

0

如果它不是authtentication類型的問題,正如Kirk所建議的,是否爲端口8888和端口80設置了Alternate Access Mappings?

0

我有同樣的問題。我去了SharePoint站點管理,應用程序管理。在應用程序安全區域中,選擇驗證提供程序。在新的頁面上,選擇默認,並在新頁面選擇啓用匿名。不知道這是否正常工作,因爲我收到其他問題,但似乎確實已刪除身份驗證問題。我已經在IIS VD上設置匿名,但得到了相同的錯誤,所以我查看了SharePoint的管理頁面。

希望這會有所幫助 尼克

相關問題