简体   繁体   中英

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?

"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.

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

explicitly states that you references .NET 4.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM