2012-02-15 3 views
0

배포하고 누락 내가 서비스 URL로 이동하면이 같은 페이지 수 :WCF 기본 엔드 포인트 나는 IIS 7에 WCF 서비스를

Service Landing Page

은이 같은 일반적인 방문 페이지를 얻을하지 않습니다를 (단지 예를 보여주기 위해 웹에서 복사, 데이터는 무죄를 보호하기 위해 흐리게) :

enter image description here

누군가가 내가 뭘 잘못 말해 줄래? 이 서비스는 예상대로 작동하지만이 서비스 사용자가 WSDL을 얻을 방법과 위치를 알기위한 정보는 없습니다.

의 app.config (서비스 프로젝트 및 IIS에있는 Web.Config 등의 서비스 사이트에 복사)

<system.web> 
    <compilation debug="true"/> 
    </system.web> 

    <system.serviceModel> 
    <services> 
     <service name="MyService.MyService" behaviorConfiguration="Web"> 
     <clear /> 

     <endpoint address="" 
        binding="wsHttpBinding" 
        name="ws" 
        behaviorConfiguration="Web" 
         contract="MyService.IMyService" /> 
<!--   
      <endpoint address="" 
        behaviorConfiguration="Web" 
        binding="webHttpBinding" 
        bindingConfiguration="" 
        name="web" 
        contract="MyService.IMyService" /> 
--> 

     <host> 
      <baseAddresses> 
      <add baseAddress="http://services.mydomain.com/MyService" /> 
      </baseAddresses> 
     </host> 

     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="Web"> 
      <serviceMetadata httpGetEnabled="True"/> 
      <serviceDebug includeExceptionDetailInFaults="False"/> 
     </behavior> 
     </serviceBehaviors> 
     <endpointBehaviors> 
     <behavior name="Web"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    </system.serviceModel> 

MyService.svc : 여기

내 관련 파일입니다
<%@ ServiceHost Service="MyService.MyService" 
       Factory="System.ServiceModel.Activation.WebServiceHostFactory" %> 

'wsHttpBinding'대신 'webHttpBinding'을 사용하여 시도해 보았습니다. 차이.

+0

app.config를 복사했다고 말하면 IIS의 web.config로 이름을 변경 했습니까? –

+0

예, 좋았습니다 (이를 나타 내기 위해 게시물을 업데이트했습니다). – BrianKE

+0

명백하게 잘못된 것을 볼 수 없다. web.config에서 고의적 인 구문 오류를 시도 했으므로 그 위치에서 읽었는지 확인할 수 있습니까? –

답변

0

ServiceHost Service = "MyService.MyService"...이 줄이 맞습니까?

+0

맞습니다. 이 프로젝트에 DLL로 가져올 때 이름 공간 및 클래스에 대한 참조입니다. – BrianKE

관련 문제