Problem Description
When working with WCF 4.0 hosted in IIS 7.5 you may get following error:
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/15510466
Exception: System.ServiceModel.ServiceActivationException: The service '/Daenet.YourService.svc' cannot be activated due to an exception during compilation. The exception message is: The type ‘Daenet.YourService, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.. ---> System.InvalidOperationException: The type 'Daenet.WFJobScheduler.SchedulerService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
--- End of inner exception stack trace ---
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 5248
Solution
It looks crazy, but solution is very simple and as you’ve expected there is nothing to do with the error description :)
The service is configured to use wsHttpBinding and I have forgotten to enable Windows Authentication is IIS. :(
Posted
Jun 07 2010, 11:45 PM
by
Damir Dobric