2010-11-19 3 views
6

방금 ​​VS2010 (프리미엄)에 새 WCF 서비스 응용 프로그램 프로젝트를 만들었고 즉시 사용할 수 있지만 web.config 파일을 열었을 때 종점 존재. 응용 프로그램이 잘 작동하고 브라우저에서 주소 (http : // localhost : 50639/Service1.svc? wsdl)를 열어 계약서를 볼 수 있으며 모든 것이 잘 보입니다.기본 wcf 서비스 응용 프로그램에 정의 된 끝 점이 없습니다

그래서 기본 프로젝트가 web.config에 정보를 배치하는 대신 다른 접근 방식을 사용하는 경우 제 질문은 무엇입니까? 코드에서 아무 것도 볼 수 없습니다.

이의 Web.config에 포함 된 모든 것을 내 지점을 표시하려면 :

<?xml version="1.0"?> 
<configuration> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <!-- To avoid disclosing metadata information, set the value below to false  and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="true"/> 
      <!-- To receive exception details in faults for debugging purposes, set the  value below to true. Set to false before deployment to avoid disclosing exception  information --> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 

</configuration> 

을 그리고 아직도이 서비스 작품과 내가 연결하고 기본 메서드를 호출 할 수 있습니다 모두 (예를 들어 GetData의())

답변

8

그것은 "다른"접근법이 아닙니다. simplified configuration이라는 WCF 4.0의 새로운 접근 방식입니다. .NET 4.0에서 프로젝트를 생성하면이 단순화 된 모드를 사용할 수 있습니다. .NET 3.5에서 프로젝트를 생성하면 오래된 채팅 구성이 생깁니다.

+0

HTTPS의 경우에도 마찬가지입니까? 나는 어떤 언급도 찾을 수 없었다. – Spock

+0

죄송합니다. 직접 사용해 보았습니다. 예, HTTPS에서도 작동합니다. – Spock

+0

@ Spock HTTPS에서 어떻게 작동합니까? – Arj

관련 문제