I am having problems setting the .NET 4 WCF service to 64 bits. I do the following steps on a 64-bit Vista OS:
Create a new WCF service project in Visual Studio 2010.
Change the platform target to x64.
After that, my WCF service will no longer work in Cassini or IIS. It should be noted that when you perform the same steps and configure on .NET 3.5, everything works fine. The project is built without problems. Any help is greatly appreciated. Error getting Im while loading the service:
(I'm not looking for the answer βcompile it like any processor.β I am more interested in knowing why this is happening. :-))
Server error in application "/". The type "WcfService3.Service1" provided as the value of the Service attribute in the ServiceHost directive or provided in the system.serviceModel / serviceHostingEnvironment / serviceActivations configuration item cannot be found. Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information about the error and where it appeared in the code.
Exception Details: System.InvalidOperationException: type WcfService3.Service1, provided as the value of the Service attribute in the ServiceHost directive or provided in the system.serviceModel / serviceHostingEnvironment / serviceActivations configuration item.
Source Error:
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the exception stack trace below.
Stack trace:
[InvalidOperationException: type WcfService3.Service1 provided as the value of the Service attribute in the ServiceHost directive or provided in the configuration element system.serviceModel / serviceHostingEnvironment / serviceActivations not found.] System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHvice base ) +51902 System.ServiceModel.HostingManager.CreateService (String normalizedVirtualPath) +1440 System.ServiceModel.HostingManager.ActivateService (String normalizedVirtualPath) +44 System.ServiceModel.HostingManager.EnsureServiceAvableable + normal
[ServiceActivationException: service / Service 1.svc could not be activated due to an exception at compile time. Exception message: Type "WcfService3.Service1" provided as the value of the Service attribute in the ServiceHost directive or provided in the system.serviceModel / serviceHostingEnvironment / serviceActivations configuration item .. cannot be found ..] System.Runtime.AsyncResult.End (result of IAsyncResult) +679246 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End (result of IAsyncResult) +190 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous.erlementwerlevicepulevlevice, string routepervicevice, wpfanvicelevice (object sender, EventArgs e) +355 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () +148 System.W eb.HttpApplication.ExecuteStep (step IExecutionStep, Boolean & completed synchronously) +75
Version Information: Microsoft.NET Framework Version: 4.0.30319; ASP.NET Version: 4.0.30319.1