x 入职了新公司.最近比较忙...一看博客...更新频率明显少了...罪过罪过... 新公司用ASP.NET MVC 遇上一个错误: Unable to cast object of type 'System.Int32' to type 'System.Array'. 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息. 异常详细信息: System.InvalidCastException: Unable to ca…
最近在研究.netcore,尝试把前后端完全分离.但是在写接口的时候,Post参数是FromBody的时候报错了 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[] An unhandled exception has occurred while executing the request. System.InvalidCastException: Unable to cast object of type '…
List<Object> list = getList(); return (List<Customer>) list; Compiler says: cannot cast List<Object> to List<Customer> 不能将Object集合强制转换成实体集合! you can always cast any object to any type by up-casting it to Object first. in your cas…
报错内容: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object at ServerResponse.end (_http_outgoing.js:690:13) 原因: response.end()方法接收的参数类型只能是字符串或Buffer, 传入的是object 解决: 找到代码出错行,重写end方法,如:r…
今天做springbook项目前端输入日期传到数据库保存报了一下错误 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sun Feb 09 16:31:32 CST 2020 There was an unexpected error (type=Bad Request, status=400). Validation…
刚刚有在程序中,传递一个空值至MS SQL Server数据库,这个值的数据类型为DATETIME执行时,它却发生了如标题提示的异常:The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. 跟踪一下,当遇上一个空值时,它并没有真正是给一个空值给数据库,而是Datetime的最小值"1/1/0001 12:00:00 AM" 在两个文本框都是空值时,跟…