Subsonic 3: Invalid cast from 'System.Byte' to 'System.Byte[]'

早过忘川 提交于 2019-12-12 01:17:57

问题


I'm trying to use Subsonic 3.0 but with every query I try it gives me this error:

"Invalid cast from 'System.Byte' to 'System.Byte[]'."

I've tried using linq and activerecord on several different tables and always having this problem.

Just to make sure, here is a code snipped that throws the error: LiteralContent.Text = DB.Teksten.SingleOrDefault(t => t.ID == Convert.ToInt32(TextID)).Tekst;

Also try to debug into the error but couldn't find the exact source of the error while stepping through it.


回答1:


Just found the solution. A user already reported this bug 33 weeks ago and posted a fix at: http://blog.wekeroad.com/subsonic/subsonic-3-0-repository-template-update/

Has to do with generation of tinyint datatype.




回答2:


I fixed this error today with the release of 3.0.0.1 (I hope): http://blog.wekeroad.com/subsonic/subsonic-3-0-0-1-released/




回答3:


I just downloaded 3.0.0.1 and it's not fixed also check this one

link text

I have included the fix



来源:https://stackoverflow.com/questions/1092796/subsonic-3-invalid-cast-from-system-byte-to-system-byte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!