Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 托管在共享主机上的WCF服务_.net_Wcf_Shared Hosting_Assembly Loading - Fatal编程技术网

.net 托管在共享主机上的WCF服务

.net 托管在共享主机上的WCF服务,.net,wcf,shared-hosting,assembly-loading,.net,Wcf,Shared Hosting,Assembly Loading,我使用.NET3.5服务开发了一个WCF,将一些数据导入到internet 使用IIS Express在本地运行正常。当我将服务部署到共享主机并将浏览器指向服务地址时,出现以下异常: 无法加载文件或程序集“System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”或其依赖项之一。系统找不到指定的文件 我的环境配置为使用32位兼容的.NET 3.5 堆栈跟踪显示: [FileNotFoundException:无

我使用.NET3.5服务开发了一个WCF,将一些数据导入到internet

使用IIS Express在本地运行正常。当我将服务部署到共享主机并将浏览器指向服务地址时,出现以下异常:

无法加载文件或程序集“System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”或其依赖项之一。系统找不到指定的文件


我的环境配置为使用32位兼容的.NET 3.5

堆栈跟踪显示:


[FileNotFoundException:无法加载文件或程序集'System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089'或其依赖项之一。系统找不到指定的文件。]
System.ServiceModel.AsyncResult.End(IAsyncResult结果)+11655726
System.ServiceModel.Activation.HostedHttPrequesStatAsyncResult.End(IAsyncResult结果)+194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication上下文,布尔流上下文)+176
System.ServiceModel.Activation.HttpModule.ProcessRequest(对象发送者,事件参数)+275
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+68
System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)+75

关于如何解决该问题的任何线索?

“我的环境配置为使用32位兼容的.NET 3.5。”

你确定吗?看起来您的本地系统正在使用.net 4.0,而您的主机只有3.5

FileNotFoundException:无法加载文件或程序集的系统,版本=4.0.0.0


明确说明您引用了.NET 4.0

否,它在本地使用.NET 3.5。请检查引用列表(解决方案资源管理器)中对系统的引用。我敢打赌,它并没有说3.5I会在所有程序集中查找,而且没有一个程序集的4.0.0.0版本是特定的。我找到了答案。我的主机提供商的配置不好。从那时起,我就放弃了WCF,开发了一个简单的旧Web服务来导入我的数据。问题太多,无法部署WCF。我在服务目录中对4.0.0.0进行了文本搜索。它显示了System.Data.Entity.Design.EntityClassGenerator 4.0.0中的大量引用,以及引用缓存中System.String、mscorlib、Version=4.0.0.0中的大量引用。@JohnPrado:您使用实体框架4.x吗?您仍然可以使用EF,但不能使用ver。如果使用.NET 3.5,则为1.0。另外,我认为问题在于框架从4.0降级到3.5。我将尝试从头开始,看看它是否解决了问题。谢谢大家的帮助。