2015-02-03 2 views
0

WCF 서비스를 별도 프로젝트 이름으로 작성한 후이 프로젝트를 참조로 추가했습니다. 웹 사이트 프로젝트 이름은 웹 사이트 프로젝트의 web.config 파일에서 AaNuWsWCF 문제 : 기본 끝점을 찾을 수 없습니다.

입니다

<system.web> 
    <compilation debug="true" /> 
    </system.web> 
    <system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="mexBehavior"> 
      <serviceMetadata httpGetEnabled="True"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <services> 
     <service behaviorConfiguration="mexBehavior" name="AaWs.RxtraIntroService"> 
     <endpoint address ="AaWs" binding="basicHttpBinding" contract="AaWs.IRxIntro"> 
     </endpoint> 
     <host> 
      <baseAddresses> 
      <add baseAddress = "http://localhost:8080" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    </system.serviceModel> 
</configuration> 

다음 내 웹 서버에이 웹 사이트 프로젝트를 업로드합니다.

나를 위해 만들어

IntroService에 이름 공간 내 웹 사이트에서 새 app.config 파일을

http://mywebsite/IntroService.svc?wsdl 

새로운 시스템을 나의 새로운 프로젝트에 서비스 참조를 제공

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.serviceModel> 
     <bindings> 
      <basicHttpBinding> 
       <binding name="BasicHttpBinding_IRxIntro" /> 
      </basicHttpBinding> 
     </bindings> 
     <client> 
      <endpoint address="http://mywebsite/IntroService.svc/RecoverInfoTechAaWs" 
       binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRxIntro" 
       contract="IntroService.IRxIntro" name="BasicHttpBinding_IRxIntro" /> 
     </client> 
    </system.serviceModel> 
</configuration> 

하지만 지금은이 서비스에 액세스하려고하면 오류가 발생합니다.

System.InvalidOperationException : 기본 엔드 포인트에게 ServiceModel은 서비스 클라이언트 구성 섹션에서 계약 'IntroService.IRxIntro'을 참조 요소를 찾을 수 없습니다. 응용 프로그램에 대해 구성 파일을 찾지 못했거나이 계약과 일치하는 끝점 요소를 클라이언트 요소에서 찾을 수 없기 때문일 수 있습니다.

당신은의 app.config가 실행 파일과 루트 폴더에 있는지 확인해야이

답변

0

에 저를 도와주세요. 그 다음의 app.config가에 대한 적절한 값이 있는지 확인하십시오 : 당신이 제공 한 정보에서

<client> 
<endpoint ... contract="" 

를, 주소 정보가 정확 보이지 않는다. 서비스의 전체 주소가 "http://localhost:8080/AaWs"이지만 서비스 참조 (wsdl url)에 "http://mywebsite/IntroService.svc?wsdl"이 표시됩니다. 참조를 생성 할 때 올바른 서비스를 가리키는 지 확인해야합니다.

0

app.config의 끝점 구성에서 name = "BasicHttpBinding_IRxIntro"특성을 제거하십시오.

관련 문제