2010-03-08 3 views
1

NTLM 인증을 사용하도록 설정되어 있지 않은 이유는 무엇입니까?Sharepoint 2010 Web Reference는 작동하지만 서비스 참조에는

웹 참조로 http://myserver/Sites/Ops/_vti_bin/Lists.asmx?WSDL을 참조 할 때 메소드를 호출하고 유효한 응답을 얻을 수 있습니다.

서비스 참조와 동일한 URL을 참조 할 때 서버는 메서드를 호출 할 때 예외를 throw합니다.

내 계정은 Sharepoint Farm의 관리자입니다.

은 (대부분 자동 생성) 서비스 참조의의 app.config입니다 : Microsoft.SharePoint '유형의

"예외 :

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    </configSections> 
    <system.serviceModel> 
     <bindings> 
      <basicHttpBinding> 
       <binding name="ListsSoap" closeTimeout="00:01:00" openTimeout="00:01:00" 
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" 
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
        useDefaultWebProxy="true"> 
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
        <security mode="TransportCredentialOnly"> 
        <transport clientCredentialType="Ntlm" /> 
        </security> 
       </binding> 
      </basicHttpBinding> 
     </bindings> 
     <client> 
      <endpoint address="http://myserver/Sites/Ops/_vti_bin/Lists.asmx" 
       binding="basicHttpBinding" bindingConfiguration="ListsSoap" 
       contract="SharepointLists.ListsSoap" name="ListsSoap" /> 
     </client> 
    </system.serviceModel> 
</configuration> 

Saddly 예외가 제공하는 정보 만이있다 .SoapServer.SoapServerException '가 발생했습니다. "

다른 세부 정보 없음 내가 사용

코드는 다음과 같습니다

public ListClass() 
    { 

     _Client = new SharepointLists.ListsSoapClient(); 

    } 

    public System.Xml.Linq.XElement GetTaskList() 
    { 
     return _Client.GetList("Tasks"); 

    } 

어떤 생각? 웹 참조가 아닌 서비스 참조를 사용하고 싶습니다.

UPDATE :

내가 롭의 제안을 시도하고이 오류가 발생했습니다 :

HTTP GET Error 
    URI: http://myserver/Sites/Ops/_vti_bin/Lists.asmx 

    The document at the url http://myserver/Sites/Ops/_vti_bin/Lists.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://myserver/Sites/Ops/_vti_bin/Lists.asmx ' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'DISCO Document' is 'There was an error downloading ' http://myserver/_vti_bin/Lists.asmx?disco '.'. - The request failed with HTTP status 404: Not Found. - Report from 'WSDL Document' is 'The document format is not recognized (the con tent type is 'text/html; charset=utf-8').'. - Report from 'XML Schema' is 'The document format is not recognized (the conten t type is 'text/html; charset=utf-8').'.

답변

1

본 서비스 참조 대화는 ASMX 서비스에 대한 적절한 구성을 생성하지 않습니다 추가합니다. 대신 svcutil을 사용해야합니다.

이 블로그 게시물은 당신에게 내가 제안 롭 감사 http://nayyeri.net/integrating-wcf-clients-with-asmx-services

+0

@ 롭을 도움이 될 것입니다,하지만 불행히도이 작동하지 않았다. 내 게시물을 오류로 업데이트했습니다. –

+0

(typo 및 downvote의 뒤늦은 수정) @Rob : -1 : 해당 블로그 게시물은 2007 년입니다. "Add Service Reference"는 ASMX 웹 서비스 또는 기타 기본 SOAP 웹 서비스에서 잘 작동합니다. 단순히 basicHttpBinding을 사용합니다. –