vs2008의 add servece reference 대화 상자를 사용하여 wsdl 파일로 추가했습니다.비누 클라이언트를 사용할 때 InvalidOperationException이 발생했습니다.
기본 엔드 포인트를 찾을 수 없습니다 요소 계약 "ServiceName.ServiceInterface"에 : 나는 서비스 프록시를 인스턴스화 할 때
MyService serviceproxy = new MyService();
, 나는 (독일어 번역) 다음 텍스트로 InvalidOperationException이를 얻을 수 서비스 모델에서 클라이언트 구성 섹션을 참조하십시오. 일 수 있습니다. 응용 프로그램 구성 파일을 찾지 못했거나 클라이언트 구성 요소 항목의 끝 점이 없으면이 계약서에 해당하는 입니다.
여기서 servicename은 vs2008 및 ServiceInterface에 서비스를 추가 할 때 서비스 이름을 자동으로 생성하는 인터페이스입니다. 가 있다면, 당신은 ASP.NET 웹 응용 프로그램 또는 웹 사이트에 있다면의 Web.config의 app.config -
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MyServiceBinding" 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="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
여기에 구성 파일을 게시하고 ServiceContract 인터페이스의 이름을 – albertjan
내 app.config의 내용으로 내 질문을 업데이트했습니다. 그러나 URL은 사용자 입력이므로 코드에서 서비스 url을 지정하고 config에서는 지정하지 않을 것입니다. – codymanix