关于ASP.NET网站的一个错误

来源:百度知道 编辑:UC知道 时间:2024/06/30 16:17:39
之前网站都好好的~~
最近不知道为什么突然打不开了,出现以下的错误!
Server Error in '/' Application.
--------------------------------------------------------------------------------

Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDec

可能是代码你没修改,但数据库的数据有增加,而你以前代码里把字符型数据转化成整形的时候由于能包容而没错,现在增加了新数据不被整形包容而出差。

调试一下,定位到某句,一看就知道了。

最近是不是修改过啊,有数据类型不匹配哦!!!

恩,好像是数据类型的问题!

检查下 是不是有不是数值型的字符串被强转为数值型