Hosting of WCF service in IIS: System.ServiceModel.ServiceActivationException

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

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

Comments

Carlo wrote re: Hosting of WCF service in IIS: System.ServiceModel.ServiceActivationException
on 05-07-2009 17:49

Are U sure?

I build a solution with duplex and I have same problem...buut no solution...can u help me?

Thanks

Damir Dobric wrote re: Hosting of WCF service in IIS: System.ServiceModel.ServiceActivationException
on 05-09-2009 13:04

Your client might be now the service?

ani wrote re: Hosting of WCF service in IIS: System.ServiceModel.ServiceActivationException
on 09-29-2009 7:42

I am geting such type problem.how to slove it.coulde you help me.

Thanks

developers.de is a .Net Community Blog powered by daenet GmbH.