ASP.NET网站部署问题集

这几天为了给客户演示我们的项目,发现原来程度在开发环境和部署环境中还不太一样,原本在开发环境中程度运行的好好的,而部署后装在服务器则可能产生不少的错误。因此记录下所遇到的问题,方便以后查询同时也希望能帮遇到相关问题的朋友尽快解决问题或者避免这类的问题出现,经过google,baidu后得出一些相关的结论: 一、 如果你的程度用到水晶报表,那就需要为服务器部署所需要的环境或程序集,否则部署后程序会出现以下错误: Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. 系统找不到指定的文件。 Source Error: Line 85: Line 86: Line 87: Line 88: Line 89: Source File: c:/inetpub/wwwroot/yuexiusf/web.config Line: 87 Assembly Load Trace: The following information can be helpful to determine why the assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded. WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM/Software/Microsoft/Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM/Software/Microsoft/Fusion!EnableLog]. -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 解决方法: 1、在你的开发环境中找到Visual Studio安装目录下的/SDK/v2.0/BootStrapper/Packages/CrystalReports,将安装文件CRRedist2005_x86.msi,复制到服务器中并安装。 2、如果程序还不能运行,需要将水晶报表的五个dll文件复制到你的网站下的bin目录,其五大将的名称如下: CrystalDecisions.CrystalReports.Engine.dll CrystalDecisions.ReportSource.dll CrystalDecisions.Shared.dll CrystalDecisions.Web.dll CrystalDecisions.Windows.Forms.dll 那么他们身在何处呢?答:“在你的开发环境中C:/Program Files/Common Files/Business Objects/2.7/Managed/目录下” 二、如果你的项目中用了excel或者word编程时,可能会出现以下错误: Could not load file or assembly 'Microsoft.Office.Interop.Word' Parser Error Message: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. Source Error: Line 27: Line 28: Line 29: Line 30: Line 31: 解决方法: 1、 网上说在http://www.microsoft.com/downloads/details.aspx?FamilyId=3C9A983A-AC14-4125-8BA0-D36D67E0F4AD&displaylang=en,下载个O2003PIA.EXE文件安装就行了,但我试了还是不行,或许我没有留心看其解决的方法,知道的同志麻烦说一声。 2、后来我干脆在服务上装上了office2003,问题就问题就搞定了(虽然这样做不是很好) 三、关于登录页面的命名,如果你的页面中有个叫login.aspx的话,网站部署后可能会出现这样的错误 : Server Error in '/XX' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login' Source Error: Line 112: public login_aspx() { Line 113: string[] dependencies; Line 114: ((Login)(this)).AppRelativeVirtualPath = "~/login.aspx"; Line 115: if ((global::ASP.login_aspx.@__initialized == false)) { Line 116: dependencies = new string[1]; Source File: c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/XX/d41012e3/4462d393/App_Web_login.aspx.cdcab7d2.ip6y7oyd.0.cs Line: 114 原因: 这是因为.net2.0中有一个叫login的控件,这样.netframework就不知道她应该选择哪个好,把你的的页面强制转换成她内置的控件,就出错了。解决方法: 1、不要取login这样的页面名称 2、如果你不想改页面的名称,在其cs文件中加上命名空间,或者改其class Name如改成“User_Login”,最后不要忘了在aspx页面中改其引用如:

如果你通过以上的方法还解决不了,提议打开C:/WINDOWS/assembly 看看相应的程序集的version是不是对上号了 还有…… 遇到时加上~~ 转载请注明出处[http://samlin.cnblogs.com]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值