I have a WCF service which works on my dev machine running IIS 7, but my coworker is running IIS 5.1 (XP). He can view the service in a web browser when he navigates to the service page, but if he tries to call an operation or navigate to it in his web browser he gets a 404 error.
I had him run ServiceModelReg -i, but that didn't change anything. I had him navigate to the .svc?wsdl page and the method is listed there. But when he tries to navigate to the method (it uses the WebGetAttribute) IIS returns 404. Any ideas?
Update
The problem only happens if he is running the site from IIS. If he loads the project using the Visual Studio Web Server (cassini) it works fine.
I don't think the issue is with the service itself, but just in case here it is:
[ServiceContract]
public interface IPFDClientAuthentication {
[OperationContract]
[WebGet(UriTemplate="/Logon?username={username}&password={password}",
BodyStyle=WebMessageBodyStyle.WrappedResponse,
ResponseFormat=WebMessageFormat.Json)]
[JSONPBehavior(callback="callback")]
bool Logon(string username, string password);
[OperationContract]
[WebGet(UriTemplate = "/Logout",
BodyStyle = WebMessageBodyStyle.WrappedResponse,
ResponseFormat = WebMessageFormat.Json)]
[JSONPBehavior(callback = "callback")]
bool Logout();
[OperationContract]
[WebGet(UriTemplate="/GetIdentityToken",
BodyStyle=WebMessageBodyStyle.WrappedRequest,
ResponseFormat=WebMessageFormat.Json)]
[JSONPBehavior(callback= "callback")]
string GetIdentityToken();
}
Here's the web.config:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service behaviorConfiguration="PFD.AuthenticationService.PFDClientAuthenticationBehavior"
name="PFD.AuthenticationService.PFDClientAuthentication">
<endpoint address="" behaviorConfiguration="PFD.AuthenticationService.PFDClientEndpointBehavior"
binding="customBinding" bindingConfiguration="clientBinding"
name="clientEndpoint" contract="PFD.AuthenticationService.IPFDClientAuthentication">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<customBinding>
<binding name="clientBinding">
<jsonpMessageEncoding/>
<httpTransport manualAddressing="true"/>
</binding>
</customBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="PFD.AuthenticationService.PFDClientEndpointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="PFD.AuthenticationService.PFDClientAuthenticationBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<extensions>
<bindingElementExtensions>
<add name="jsonpMessageEncoding" type="Microsoft.Ajax.Samples.JsonpBindingExtension,
PFD.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bindingElementExtensions>
</extensions>