John Prado
John Prado

Reputation: 804

WCF Service hosted on shared host

I developed a WCF using .NET 3.5 service to import some data to internet.

Locally all is working fine using IIS Express. When I deploy the service to shared host and point my browser to the service address I got the following exception:

Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

My enviroment is configured to use .NET 3.5 with 32 bit compatibility.

The stack trace shows:

[FileNotFoundException: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.] System.ServiceModel.AsyncResult.End(IAsyncResult result) +11655726 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176 System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +275 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Any clues on how to solve that one?

Upvotes: 0

Views: 309

Answers (2)

abatishchev
abatishchev

Reputation: 100288

FileNotFoundException: Could not load file or assembly 'System, Version=4.0.0.0

explicitly states that you references .NET 4.0

Upvotes: 0

KingCronus
KingCronus

Reputation: 4519

"My enviroment is configured to use .NET 3.5 with 32 bit compatibility."

You sure about that? Looks a lot like your local system is using .net 4.0 and your host is only 3.5.

Upvotes: 2

Related Questions