首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >算术运算导致溢出。

算术运算导致溢出。
EN

Stack Overflow用户
提问于 2010-11-25 14:19:32
回答 1查看 7.9K关注 0票数 1

该应用程序在Win server 2003 /IIS 6.0环境下运行良好。当我移动代码以赢得服务器2008/IIS7.0时,我会出现以下错误?你能告诉我错误的原因是什么吗?我错过了什么吗?

代码语言:javascript
复制
Server Error in '/' Application.

Arithmetic operation resulted in an overflow. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.OverflowException: Arithmetic operation resulted in an overflow.

堆栈跟踪:

OverflowException:算术操作导致溢出。+37 CoreLab.Common.a.a(代表A_0) +1935 CoreLab.Oracle.ab.a(OracleConnection A_0) +214 CoreLab.Oracle.OracleConnection.Open() +375 A_0 personId,Int32 pageNumber,Int32 rowsPerPage,in 32& rowsCountTotal)在c:\inetpub\wwwroot\mtitimeproduction\businesslogic\timecardbl.cs:24 MonsterWorldwide.iTime.WebGUI.WebParts.TimecardList.LoadData() in c:\inetpub\wwwroot\mtitimeproduction\webgui\webparts\timecardlist.ascx.cs:112 MonsterWorldwide.iTime.WebGUI.WebParts.TimecardList.Page_Load(Object发件人中,c:\inetpub\wwwroot\mtitimeproduction\webgui\webparts\timecardlist.ascx.cs:52 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Control.LoadRecursive() +191 System.Web.UI.Control.LoadRecursive() +191 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint) +2428

版本信息:微软.NET框架版本:2.0.50727.4952;ASP.NET版本:2.0.50727.4927

EN

回答 1

Stack Overflow用户

发布于 2010-11-25 14:30:51

代码语言:javascript
复制
[OverflowException: Arithmetic operation resulted in an overflow.] 
System.IntPtr.ToInt32() +37 
CoreLab.Common.a.a(Delegate A_0) +1935 
CoreLab.Oracle.ab.a(OracleConnection A_0) +214

这看起来像是一些写得不好的非托管互操作代码,它没有考虑CPU类型,在x64位操作系统中运行时会失败。在64位OS中,指针是64位整数,与32位OS相反.

也许您应该检查正在使用的这个CoreLab.Common组件的文档,它是否支持64位系统。

引用IntPtr.ToInt32方法的文档:

OverflowException:在64位平台上,此实例的值太大或太小,不能表示为32位有符号整数。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4278013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档