网站部署出现错误,请各位给我解决哈,谢谢!
我的程序在我的电脑上运行是正确的,但是问题是我部署到服务器上就出现错误了 ,请大家给我解决哈,谢谢您们!求您们帮哈忙,谢谢了!
报的错误是:
Object cannot be cast from DBNull to other types.
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.InvalidCastException: Object cannot be cast from DBNull to other types.
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:
[InvalidCastException: Object cannot be cast from DBNull to other types.]
System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +54
System.Convert.ToInt32(Object value) +25
Right.AddDevice(Int32 t) +143
Right.GetDevice(Int32 n) +179
Right.Page_Load(Object sender, EventArgs e) +1396
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061