| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 542 人关注过本帖
标题:服务器运行时错误
只看楼主 加入收藏
Dailen
Rank: 2
等 级:论坛游民
帖 子:12
专家分:49
注 册:2009-8-17
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
服务器运行时错误
   很急的问题,在我本机上运行(网站)没有任何问题,放到远程服务器上就出现了如下错误:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 33:                 User user = mu.M_SelectUserByID(id);
Line 34:                 this.lblID.Text = id.ToString();
Line 35:                 this.lblTel.Text = user.QB_TEL.ToString();
Line 36:                 this.lblState.Text = user.QB_STATE.ToString();
Line 37:                 this.lblNum.Text = user.QB_NUM.ToString();
 

Source File: d:\suntek\jxtweb\User\ShowUser.aspx.cs    Line: 35

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   User_ShowUser.Page_Load(Object sender, EventArgs e) in d:\suntek\jxtweb\User\ShowUser.aspx.cs:35
   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

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; Version:2.0.50727.42

   远程服务器使用的是Windows 2000操作系统。急~~~~ 各位大侠帮帮忙!
搜索更多相关主题的帖子: 服务器 运行 
2009-09-10 12:09
aganarRMJ
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:27
专家分:160
注 册:2009-9-10
收藏
得分:20 
User user = mu.M_SelectUserByID(id);
你把这一句换成下面两句看看:
User user = new User();
user=mu.M_SelectUserById(id);
2009-09-10 16:48
快速回复:服务器运行时错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018654 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved