IIS 5.1에 WCF 서비스를 배포하려고했습니다. 나는 여기에서 대답 this을 발견했다 - 그것은 같은 질문 인 것처럼 보인다. 나는이를 수행 할 때 그러나, 다음 서비스 페이지로 이동하려고, 내가받을 다음과 같은 오류 :IIS 5.1에 WCF 서비스 배포
A name was started with an invalid character. Error processing resource 'http://MyComputerName/MyService/MyService...
<%@ ServiceHost Language="C#" Debug="true" Service="ServiceNamespace.MyService" CodeBehind="MyService.sv...
나는 IIS에서 가상 디렉터리를 만들어 내 솔루션 폴더의 하위 디렉토리에 지적 - 및 가상 디렉터리에 게시하고 있습니다.
내 Web.config의 서비스 노드는 다음과 같습니다
<services>
<service name="ServiceNamespace.MyService" behaviorConfiguration="ServiceNamespace.MyService">
<!-- Service Endpoints -->
<endpoint address="" binding="basicHttpBinding" contract=" ServiceNamespace.IMyService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
<identity>
<dns value="localhost"/>
</identity>
-->
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
이 컴파일 및 VS2008에서 실행하면 잘 실행됩니다. 아무도 이것에 올바른 방향으로 나를 가리킬 수 있습니까? 파일 뒤에 코드가 있음을
코드 숨김 = "~ /의 App_Code/YourServiceClass.cs"
거기에 App_Code 디렉터리가 없지만 MyService.svc.cs를 ~/MyService.svc.cs로 바꿔도 아무런 차이가 없습니다. –