【发布时间】:2012-05-08 16:04:49
【问题描述】:
我使用 .NET 3.5 服务开发了一个 WCF,用于将一些数据导入互联网。
使用 IIS Express 在本地一切正常。当我将服务部署到共享主机并将浏览器指向服务地址时,出现以下异常:
无法加载文件或程序集“系统,版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”或其依赖项之一。系统找不到指定的文件。
我的环境配置为使用具有 32 位兼容性的 .NET 3.5。
堆栈跟踪显示:
[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
关于如何解决这个问题的任何线索?
【问题讨论】:
-
我放弃了 WCF 并开发了一个普通的旧 Web 服务来导入我的数据。部署 WCF 的问题太多。
标签: .net wcf shared-hosting assembly-loading