Chào mọi người
Hiện tại mình đang hết sức đau đầu khi website của mình thỉnh thoảng rất hay xuất hiện lỗi sau:
Code:
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:
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:
[NullReferenceException: Object reference not set to an instance of an object.]
Portal.Controller.Common.Page.SetHomePage(String languageKey) +148
Portal.Controller.Common.Page.get_HomePage() +42
Portal.Website.Default.Page_Load(Object sender, EventArgs e) +91
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Trong Event xuất hiện warning như sau"
Code:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/6/2012 6:25:12 PM
Event time (UTC): 8/6/2012 11:25:12 AM
Event ID: 40a0f1dbd6db4f32beda4101d9935e5a
Event sequence: 209
Event occurrence: 26
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/12146/Root-1-129887248363480000
Trust level: Full
Application Virtual Path: /
Application Path: C:\Inetpub\vhosts\xxx.com\httpdocs\
Machine name: DEDI1424
Process information:
Process ID: 5352
Process name: w3wp.exe
Account name: DEDI1424\IWPD_7(abc)
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at Portal.Controller.Common.AppData.Page.SetHomePage(String languageKey)
at Portal.Controller.Common.AppData.Page.get_HomePage()
at Portal.Website.Default.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: http://xxx.com/Default.aspx
Request path: /Default.aspx
User host address: 113.168.174.7
User:
Is authenticated: False
Authentication Type:
Thread account name: DEDI1424\IWPD_7(abc)
Thread information:
Thread ID: 13
Thread account name: DEDI1424\IWPD_7(abc)
Is impersonating: False
Stack trace: at Portal.Controller.Common.AppData.Page.SetHomePage(String languageKey)
at Portal.Controller.Common.AppData.Page.get_HomePage()
at Portal.Website.Default.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Khi bị như vậy thì nhiều lúc phải restart lại IIS thì mới chạy được.Tuy nhiên tính trạng này rất hay xảy ra
Mọi người cho mình hỏi lỗi trên thường là do bên config Server hay lỗi do code.Website dùng ASP.NET chạy trên IIS 6 có cài đặt Plesk
Thanks