Reputation: 11
I have a WCF REST Service hosted in IIS 6.0 (.NET framwork 4). This service is being called by a JAVA service. Now when the Java service accesses this service via http it works fine but the time it calls using https then error 404 is returned
"Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed"
I have verified that the SSL certificate is installed and there are other two serviceshosted in IIS which seem unaffected.
Now I checked that I am able to access the .svc file via the https domain. HTTPS:.......service alias/service.svc <-- this works fine
The issue happens when a method is called inside the service. HTTPS:.......service alias/service.svc/service method name <-- throws error
Now I checked on another server it works fine using https. So my guess is there is not much wrong with the code. So can you guys tell me if there is anything that I am missing? I need this service to run on https in this server as well.
This service communicates via POST while the other two services which seem unaffected use GET. Not sure if this is of any significance though.
Upvotes: 1
Views: 3758
Reputation: 471
If you are getting a 404, it has got nothing to do with certificate or https. Just check if the method is configured properly i.e. [WebInvoke]
in your service contracts has properly mentioned the methods name.
Upvotes: -1
Reputation: 45
It sounds like you are missing something in your web.config. You will need to either change your default endpoint to support encryption or create a new endpoint doing so.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding>
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
Upvotes: 3