By invoking of the WCF service hosted in the IIS, you may get following error:
There was no endpoint listening at http://localhost/servicemodelsamples/service.svc that could accept the message. This could be caused by an incorrect address or SOAP action, among other things. See InnerException, if present, for more details.
Additionally, the event log contains following error which is related to the first one:
WebHost failed to process request
Sender Information: System.ServiceModel.Activation.HostedHttpModuleRequestAsyncResult/52243212
Exception: System.ServiceModel.ServiceActivationException: The type 'Microsoft.ServiceModel.Samples.CalculatorService', provided as the Service attribute value in the ServiceHost directive could not be found. ---> System.InvalidOperationException: The type 'Microsoft.ServiceModel.Samples.CalculatorService', provided as the Service attribute value in the ServiceHost directive could not be found.
at System.ServiceModel.Activation.ServiceHostFactory.System.ServiceModel.Activation.IServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String processedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String processedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String processedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String processedVirtualPath)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
Process Name: aspnet_wp
Process ID: 2208
For more information, see Help and Support Center at
The error has occurred at the server side, because the client invoked the file with the extension .SVC. All files of that type will be handled by ISAPI.DLL, which tries to map the request to WCF service. However the error is caused at the client side, because the client invoked the service at some unknown URI.
In this example the client has invoked the service at following URI:
http://localhost/servicemodelsamples/service.svc
The solution is just to use the right URI i.e.: http://servicemachine/myservice/service.svc
Posted
Jul 14 2006, 11:40 PM
by
Damir Dobric