이제 시작하겠습니다. wcf 서비스를 만들고 Visual Studio 2012를 통해 IIS 7.5에 게시합니다. WCF 테스트 클라이언트를 사용하면 서비스가 실행 중이고 잘 작동합니다. WCF 발견 wcf 서비스 만 작동
는 UDP 검색을 사용하려면, 나는 다음과의 app.config에 약간의 조정을 : 게시 할 때 파일도의 Web.config에 복사<system.serviceModel>
<services>
<service name="System_Core.wcf_service">
<endpoint address="" binding="wsHttpBinding" contract="System_Core.IWCF_Service" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<endpoint isSystemEndpoint="true" kind="udpDiscoveryEndpoint" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8888" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="False" httpsGetEnabled="False" />
<!-- 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="True" />
<serviceDiscovery />
</behavior>
</serviceBehaviors>
</behaviors>
있다. 즉, wcf 서비스 자체가 잘 작동합니다.
문제는 다음과 같습니다. 네트워크에서 wcf 서비스를 찾아야하는 또 다른 프로젝트를 만듭니다. 그러나 검색은 브라우저에서 .svc를 처음 호출하거나 수동으로 탐색 한 후에 만 작동합니다. IIS7 관리자에서 IIS 또는 wcf를 다시 시작하면 검색이 실패했거나 응답이 없습니다. wcf가 자동으로 시작되지 않은 것 같습니다. IIS가 자동으로 시작되도록 설정을 확인합니다. 사이트 자체도 자동으로 시작됩니다. 심지어 웹상의 일부 권고에 applicationHost.config 기반으로이 줄 중 일부를 넣을 수도 있습니다.
<site name="WCF" id="1" serverAutoStart="true">
<application path="/" serviceAutoStartEnabled="true" >
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\WCF" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8888:" />
</bindings>
</site>
<applicationPools>
<add name="DefaultAppPool" startMode="AlwaysRunning" managedRuntimeVersion="v4.0" />
<add name="ASP.NET v4.0" managedRuntimeVersion="v4.0" />
<add name="ASP.NET v4.0 Classic" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" />
<applicationPoolDefaults>
<processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="false" />
</applicationPoolDefaults>
</applicationPools>
여전히 작동하지 않았습니다! IIS는 'Started'라고 말했고, Site는 'Started'라고 말했지만, 서비스 .svc 파일이 브라우저에서 수동으로 호출 된 후에 만 작동합니다. 서버 또는 사이트를 다시 시작하면 작동하지 않습니다. 나는 IIS가 시작할 때 모든 서비스가 시작되어야한다고 생각하지만, 그렇지 않을 것이다.
나는 인터넷에서 다른 사람들과 똑같은 문제가 있지만 여전히 해결되지 않은 것을 발견했습니다.