I am converting a website over to ASP.NET 2.0, which supports .NET Framework versions 2.0 – 3.5. I am getting the following error message on a particular tab that is connected to a SQL DB. I am stuck at where this change needs to occur as I did not build this particular section of the site. Here is the error message and the Code. Any Help would be greatly appreciated.
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.]
MagicAjax.AjaxCallHelper.GetPageHiddenDictionary(Page page, String fieldName) +37
MagicAjax.AjaxCallHelper.HandleClientScriptBlocks(Page page, Boolean
reflectToClient) +17
MagicAjax.AjaxCallHelper.Page_PreRender(Object sender, EventArgs e) +238
System.Web.UI.Control.OnPreRender(EventArgs e) +8996626
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +2496
Related
I my share point site I have one List named "People List" and one Wiki Page Library named "People". I have created one visual webpart to display data from People list. I have created webpart property to read listname.The webpart property name for my visual webpart is "People". When I check whether list exists in my site using the following function it returns true:-
public static bool isListExists(SPWeb spWeb, string listName)
{
return spWeb.Lists.TryGetList(listName) != null;
}
But there is no List named "People" exists in my site. Only wiki page library named "People" exists. When I added my webpart in "MySite/People/default.aspx" page I got error.
Column 'Title' does not exist. It may have been deleted by another user.
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.ArgumentException: Column 'Title' does not exist. It may have been deleted by another user.
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:
[ArgumentException: Column 'Title' does not exist. It may have been deleted by another user.]
Microsoft.SharePoint.SPFieldCollection.GetField(String strName, Boolean bThrowException) +26422968
Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException) +47
Microsoft.SharePoint.SPListItem.get_Item(String fieldName) +12
CL.DanceStudio.Portal.CLDance_Instructor.<>c__DisplayClass3.<Select>b__1() +1155
Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +729
Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27491206
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) +27194345
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) +93
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_InstructorUserControl.Select() +291
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_InstructorUserControl.Page_Load(Object sender, EventArgs e) +52
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Control.AddedControl(Control control, Int32 index) +350
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_Instructor.CreateChildControls() +194
System.Web.UI.Control.EnsureChildControls() +146
System.Web.UI.Control.PreRenderRecursiveInternal() +61
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
I think it is due to name conflict. Please provide me a solution.
I have a website I believe to be in ASP .NET, which is throwing an exception System.NullReferenceException: Object reference not set to an instance of an object.. Stack trace shows as follows:
[NullReferenceException: Object reference not set to an instance of an object.]
SomeScript.getConnection() +32
SomeScript.buildGridData() +299
SomeScript.Page_Load(Object sender, EventArgs e) +92
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +163
System.Web.UI.Control.LoadRecursive() +163
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2603
Same error is occurring for basically all pages of the site which request data, with just the SomeScript in above stack trace alternating for the loading script.
Environmental changes have only been in changing password for a remote SMTP server the site uses for mailing out, but site was continuing to load fine after that change was made.
My feeling is that these errors with the getConnection() method started occurring after a user tried to use said SMTP mailing function within the website and received an error (I was not able to capture the error user received).
I'm a bit lost with debugging any further from here as the getConnection() method seems to be within compiled DLLs and not accessible by me.
What is the next step in trying to remove the error?
Firstly, it's unlikely that an SMTP password change has caused the issue from your description of it. But if that password change was made in the Web.config file, I'd say it's possible it was made less carefully than it should have been, and in fact a database connection-related section in there has been inadvertently modified and is no longer valid.
If you want to be able to debug into the DLL, you can disable the option to debug "Just My Code" in Visual Studio (something like Tools/Options/Debugging) - you should then be able to step down into these DLLs and see where the issue lies. Hopefully it won't require any code changes, and you can just fix up the configuration file.
I'm copying and pasting my application from one server (works fine) to another server (it doesn't work fine).
I get this on the new server, even though the code hasn't changed:
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.]
MasterPagePS_Index.Page_Load(Object sender, EventArgs e) +117
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) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Are you accessing a database, file, or any external resources? Sounds like you have a configuration difference, check your web.config.
You don't use relative path in oder to access your ressource (File, page, style, assembly , etc...)
so ASP.Net don't find your file, throw null exception.
The error you provided doesn't give much information. I suggest that you perform a remote debugging and check which line is causing the error.
Or you can add the Global.asax file and catch the error in Application_Error and email the error to yourself.
Dim ex As Exception = Server.GetLastError()
Dim hue As System.Web.HttpUnhandledException = New System.Web.HttpUnhandledException(ex.Message, ex)
Dim html As String = hue.GetHtmlErrorMessage()
' TODO: Send the html string. This will send you the formatted html of the exception including the source of the error and stacktrace.
My custom error handler returns:
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
Stack Track: at System.Web.UI.Page.HandleError(Exception e) at
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest() at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.inc_iframe_eventdetail_aspx.ProcessRequest(HttpContext context) in
c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET
Files\root\c30f285f\68ea8ff1\App_Web_g4uza9zi.4.cs:line 0 at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
Target Site: Boolean HandleError(System.Exception)
However, the generic error handler returns:
Server Error in '/' Application. Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key
constraints. 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.Data.ConstraintException: Failed to enable
constraints. One or more rows contain values violating non-null,
unique, or foreign-key constraints.
Source Error:
Line 44: ChurchEventDataSource.SelectParameters.Add("ChurchEventId",
Request.QueryString["EventId"]); Line 45: Line 46:
EventFormView.DataBind(); Line 47: break; Line 48:
Source File:
c:\Sites\Altruistic\ChurchFinder\Inc\Iframe\EventDetail.aspx.cs Line:
46
Obviously, I want the most detailed description possible.
Where is your custom error handler & how are you retrieving the exception. Most probably you might be using HttpServerUtility.GetLastError method to get the exception - so in such case use InnerException property (if not null) of the actual exception object - it will have the actual exception that has occured.
When I call Bitmap.Save function, this error occurs: "A generic error occurred in GDI+". When I call from localhost it work, but when I call from another computer this error occurs.
Server Error in '/jobnumber' Application:
A generic error occurred in GDI+.
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.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
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:
[ExternalException (0x80004005): A
generic error occurred in GDI+.]
System.Drawing.Image.Save(String
filename, ImageCodecInfo encoder,
EncoderParameters encoderParams)
+377518 System.Drawing.Image.Save(String
filename, ImageFormat format) +69
System.Drawing.Image.Save(String
filename) +25
Assignment.CreateBitmapImage(String
sImageText, Image Image1, JobInfo
job_info_param) +124
Assignment.PrintButton_Click(Object
sender, EventArgs e) +271
System.Web.UI.WebControls.Button.OnClick(EventArgs
e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
+13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +1565
This is usually an indication the web user (IIS_USR for example) has no rights to
save any data to the folder where you are saving the bitmap on the webserver.
I had similar problems before. Check the access rights on the server for that folder.
Start out by giving everyone full access to that folder (just to make sure that is the problem) then narrow it down again so only the required user has access.