2011-01-28 5 views
0

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"

답변

1

마침내 대답을 찾았습니다. IIS의 응용 프로그램은 ASP.NET 1.1을 사용하도록 구성되었습니다. 나는 그것을 2.0으로 바꿨고 잘 동작했다.

0

경로 뒤에 코드가 제대로 보이지 않습니다, 나는 그렇게 상대 경로해야한다고 생각 cs 파일을 가리키면 svc 파일을 가리키는 것처럼 보입니다.

+0

거기에 App_Code 디렉터리가 없지만 MyService.svc.cs를 ~/MyService.svc.cs로 바꿔도 아무런 차이가 없습니다. –

0

확인 :

+0

MyService.svc에 대한 코드 숨김은 MyService.svc.cs이므로 유효합니다. –