首页 新闻 会员 周边

在事件查看器中老是看到这样的错误提醒是怎么回事呢?

0
悬赏园豆:60 [已关闭问题]

事件类型: 警告
事件来源: ASP.NET 2.0.50727.0
事件种类: Web Event
事件 ID: 1309
日期:  2010-5-19
事件:  21:44:04
用户:  N/A
计算机: HELLOWORLD
描述:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2010-5-19 21:44:04
Event time (UTC): 2010-5-19 13:44:04
Event ID: f53b19b3931d4089bd1e881fdbf1fed8
Event sequence: 20818
Event occurrence: 51
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/383510895/Root-1-129187327752343750
    Trust level: Full
    Application Virtual Path: /
    Application Path: G:\homep5\xd895\
    Machine name: HELLOWORLD
 
Process information:
    Process ID: 5208
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: ArgumentException
    Exception message: String cannot be of zero length.
Parameter name: oldValue
 
Request information:
    Request URL: http://www.xiangdang.net/ArticalAdd.aspx

    Request path: /ArticalAdd.aspx
    User host address: 60.173.5.50
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.String.Replace(String oldValue, String newValue)
   at ArticalAdd.Button3_Click(Object sender, EventArgs e) in G:\homep5\xd895\
\ArticalAdd.aspx.cs:line 144
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。

haolijing的主页 haolijing | 初学一级 | 园豆:70
提问于:2010-05-19 22:41
< >
分享
其他回答(2)
0

这个问题属于ms的经典错误了,要是变w3wp的error的话一般会导致IIS死掉的,但是warn是可以忽略的,有时候一个js错误也会引发该警告的

小AI | 园豆:354 (菜鸟二级) | 2010-05-20 00:05
0

ArticalAdd.aspx.cs:line 144号是什么呢?

Astar | 园豆:40805 (高人七级) | 2010-05-20 07:01
0

错误提示很清楚

String cannot be of zero length

问题出在 Button3_Click 这个事件处理程序中

String.Replace 这一句 oldValue 你输入了一个空字符串,这是不允许的。你可以在这个之前判断一下oldValue字符串是否为空,如果为空,不要调用 String.Replace.

eaglet | 园豆:17139 (专家六级) | 2010-05-21 07:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册