c# - Why am I getting a Specified Cast is not valid error? -
i've developed application asp.net mvc 2, , after deploying it, invalidcastexception
:
error/exception: "specified cast not valid."
stacktrace:
[invalidcastexception: specified cast not valid.] system.data.sqlclient.sqlbuffer.get_time() +77 system.data.sqlclient.sqldatareader.gettimespan(int32 i) +56 read_question(objectmaterializer`1 ) +1740 system.data.linq.sqlclient.objectreader`2.movenext() +29 system.collections.generic.list`1..ctor(ienumerable`1 collection) +7667556 system.linq.enumerable.tolist(ienumerable`1 source) +61 testenvironment.managements.questionmanager.getquestionsbytestid(int32 testid) in d:\parallelminds\projects\testapplication\testenvironment\testenvironment\managements\questionmanager.cs:131 testenvironment.controllers.loadtestcontroller.index(nullable`1 testid) in d:\parallelminds\projects\testapplication\testenvironment\testenvironment\controllers\loadtestcontroller.cs:31 lambda_method(executionscope , controllerbase , object[] ) +86 system.web.mvc.actionmethoddispatcher.execute(controllerbase controller, object[] parameters) +17 system.web.mvc.reflectedactiondescriptor.execute(controllercontext controllercontext, idictionary`2 parameters) +178 system.web.mvc.controlleractioninvoker.invokeactionmethod(controllercontext controllercontext, actiondescriptor actiondescriptor, idictionary`2 parameters) +24 system.web.mvc.<>c__displayclassd.<invokeactionmethodwithfilters>b__a() +53 system.web.mvc.controlleractioninvoker.invokeactionmethodfilter(iactionfilter filter, actionexecutingcontext precontext, func`1 continuation) +258 system.web.mvc.<>c__displayclassf.<invokeactionmethodwithfilters>b__c() +20 system.web.mvc.controlleractioninvoker.invokeactionmethodwithfilters(controllercontext controllercontext, ilist`1 filters, actiondescriptor actiondescriptor, idictionary`2 parameters) +193 system.web.mvc.controlleractioninvoker.invokeaction(controllercontext controllercontext, string actionname) +300 system.web.mvc.controller.executecore() +104 system.web.mvc.controllerbase.execute(requestcontext requestcontext) +36 system.web.mvc.controllerbase.system.web.mvc.icontroller.execute(requestcontext requestcontext) +7 system.web.mvc.<>c__displayclass8.<beginprocessrequest>b__4() +34 system.web.mvc.async.<>c__displayclass1.<makevoiddelegate>b__0() +21 system.web.mvc.async.<>c__displayclass8`1.<beginsynchronous>b__7(iasyncresult _) +12 system.web.mvc.async.wrappedasyncresult`1.end() +53 system.web.mvc.mvchandler.endprocessrequest(iasyncresult asyncresult) +30 system.web.mvc.mvchandler.system.web.ihttpasynchandler.endprocessrequest(iasyncresult result) +7 system.web.callhandlerexecutionstep.system.web.httpapplication.iexecutionstep.execute() +8681102 system.web.httpapplication.executestep(iexecutionstep step, boolean& completedsynchronously) +155
why getting error when deploy application? works fine in local development server, , exception on 1 page.
without more details guess table accessing on deployment database inconsistent table on development database.
maybe have column of different type on local machine.
either or there invalid data in record retrieving in deployment database.
Comments
Post a Comment