迁移到Windows Server 2008 r2时,.net 2.0 Web应用程序抛出错误 [英] .net 2.0 web application throws errors when migrated to windows server 2008 r2

查看:103
本文介绍了迁移到Windows Server 2008 r2时,.net 2.0 Web应用程序抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有旧的asp.net Web应用程序,它从Windows Server 2003(我beleieve)移动到64位Windows Server 2008 r2。我的应用程序是内置的.NEt 2.0每当我尝试运行应用程序时,它会抛出错误,例如'不能加载文件或程序集'Oracle.Web,Version = 2.112.1.0,Culture = neutral,PublicKeyToken = 89b483f429c47342'或其中一个依赖。访问被拒绝'如果我刷新页面它显示不同的错误,如ServiceModel中的一些问题。

我将应用程序设置为在应用程序池.Net 2.0上运行。我设置了32位虚假,托管管道模式是经典的。它运行在网络服务标识上。

当它抛出Oracle客户端异常时,我查看了GAC,我们确实在我们的服务器上安装了Oracle Web版本2.112.1.0 x86.

当它抛出ServiceModel错误时,我检查了applicationHost配置,我们在配置文件中有以下设置。

通过将Oracle Client更改为Oracle托管访问库,我也尝试在更改后在.Net 4.0中构建应用程序。应用程序构建成功没有任何错误,但当我尝试发布应用程序时,它抛出无法加载MyWebApp.dll错误。

我不知道如何让应用程序运行。



我尝试过:



我将应用程序设置为在应用程序池上运行.Net 2.0 。我设置了32位虚假,托管管道模式是经典的。它运行在网络服务标识上。

当它抛出Oracle客户端异常时,我查看了GAC,我们确实在我们的服务器上安装了Oracle Web版本2.112.1.0 x86.

当它抛出ServiceModel错误时,我检查了applicationHost配置,我们在配置文件中有以下设置。

通过将Oracle Client更改为Oracle托管访问库,我也尝试在更改后在.Net 4.0中构建应用程序。应用程序构建成功没有任何错误,但当我尝试发布应用程序时,它抛出无法加载MyWebApp.dll错误。

I have old asp.net web application which is moved from windows server 2003 ( i beleieve ) to 64 bit windows server 2008 r2. My application was built in .NEt 2.0 Every time i tried to run the application it throws error like 'ould not load file or assembly 'Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. Access is denied' and if i refreshed the page it shows different error like some issue in ServiceModel.
I set the application to run on application pool .Net 2.0. I have set 32 bit false, managed pipe line mode is classic. It is running on Network Service Identity.
When it threw Oracle client exception, i looked into GAC and we do have Oracle web version 2.112.1.0 x86,amd in our server.
When it threw ServiceModel error, i checked applicationHost config, and we do have below settings in the configuration file.
I also tried to build application in .Net 4.0 after changing by changing Oracle Client to Oracle managed access library. Application built successfully without any error but when i tried to publish the application, it threw cannot load MyWebApp.dll error.
I do not know how do i make the application run.

What I have tried:

I set the application to run on application pool .Net 2.0. I have set 32 bit false, managed pipe line mode is classic. It is running on Network Service Identity.
When it threw Oracle client exception, i looked into GAC and we do have Oracle web version 2.112.1.0 x86,amd in our server.
When it threw ServiceModel error, i checked applicationHost config, and we do have below settings in the configuration file.
I also tried to build application in .Net 4.0 after changing by changing Oracle Client to Oracle managed access library. Application built successfully without any error but when i tried to publish the application, it threw cannot load MyWebApp.dll error.

推荐答案

这只是一个猜测,但它似乎您的站点代码编译为目标AnyCPU。我正在使用的提示是您正在使用32位Oracle客户端并将代码移动到64位服务器。



进入项目属性,构建选项卡,以及将平台目标从AnyCPU更改为x86。重新编译和部署,看看会发生什么。
This is just a guess but it seems like your site code is compiled to target "AnyCPU". The hint I'm using is that you're using a 32-bit Oracle client and you moved the code to a 64-bit server.

Go into the Project Properties, Build tab, and change the platform target from AnyCPU to x86. Recompile and deploy and see what happens.


这篇关于迁移到Windows Server 2008 r2时,.net 2.0 Web应用程序抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆