当前位置:编程学习 > C#/ASP.NET >>

服務器上的問題?急。。。

大哥大姐,幫我解決一下謝啦。。。

我的程序在本地測試正常,上傳到服務器上的時候,就出來以下的錯誤



'/task' 應用程式中發生伺服器錯誤。
--------------------------------------------------------------------------------

Object reference not set to an instance of an object. 
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。 

例外詳細資訊: System.NullReferenceException: Object reference not set to an instance of an object.

原始程式錯誤: 

在執行目前 Web 要求期間,產生未處理的例外狀況。如需有關例外狀況來源與位置的資訊,可以使用下列的例外狀況堆疊追蹤取得。  

堆疊追蹤: 


[NullReferenceException: Object reference not set to an instance of an object.]
   Spring.Web.UI.Page.InitializeMessageSource() +88
   Spring.Web.UI.Page.OnPreInit(EventArgs e) +26
   System.Web.UI.Page.PerformPreInit() +31
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282

 


--------------------------------------------------------------------------------
版本資訊: Microsoft .NET Framework 版本:2.0.50727.3074; ASP.NET 版本:2.0.50727.3074  --------------------编程问答-------------------- 沒人回答嗎,沒人回答嗎 --------------------编程问答-------------------- 异常处理有问题,该判断null的时候没有进行判断,可能是在你做正常操作的时候是没有问题的 --------------------编程问答-------------------- 调用了未实例化的对象 --------------------编程问答-------------------- 这种问题的可能性太多,你只能自己看代码啦,看是不是哪里的资源路径不对,或者缺少资源,使得某些实例化失败等等 --------------------编程问答-------------------- 上傳到服務器了,怎么查看哪一行有錯誤呀? --------------------编程问答-------------------- Spring.Web.UI.Page.InitializeMessageSource()中使用了未初始化的对象,也就是使用了某个为null的对象,楼主查查看。 --------------------编程问答-------------------- 未将对象引用到对象的实例,声明了变量,但是没有赋值,仍然为null.用的时候就会报错.

你在本机调试正常吗? --------------------编程问答-------------------- 什么样的页面出现这个错误?
--------------------编程问答-------------------- 我在本地调试是正常的,就在本地的IIS下也是正常的。上传至服务器就出错了。。。。

--------------------编程问答-------------------- 這個是我TRACE的信息

Trace Information 
Category Message From First(s) From Last(s) 
aspx.page Begin PreInit   
Unhandled Execution Error 
Object reference not set to an instance of an object.
  at Spring.Web.UI.Page.InitializeMessageSource()
  at Spring.Web.UI.Page.OnPreInit(EventArgs e)
  at System.Web.UI.Page.PerformPreInit()
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,