Main Page | Forums | Register | Active Topics | Members | Search
 
Username:
Password:
ASP Calendars Forum >> ASP Calendars >> Support >> Admin Calendar Issue - Please help
Admin Calendar Issue - Please help
Author Topic
usruss


Newbie

Join Date: 4/14/2010
Posts: 1

Posted: 4/14/2010 6:38:32 PM

Everything works just fine on my development server. But after I put the application on the production server it show an error when I'm trying edit, delete or insert. Here is the error message:

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 72: Protected Sub gvEvents_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvEvents.SelectedIndexChanged
Line 73: Dim objEvents As clsRecurEventList = Session("objEvents")
Line 74: Dim objEvent As clsRecurEvent = objEvents(gvEvents.PageIndex * gvEvents.PageSize + Me.gvEvents.SelectedIndex)
Line 75: Dim objTypes As clsRecurTypes = Session("objTypes")
Line 76: Dim objCalenders As clsCalenders = Session("objCalenders")


Source File: C:\CWCM\Site\Controls\AdminManageEvents.ascx.vb Line: 74

Please help.

George


ASPCalendarsAdmin


Administrator

Join Date: 12/12/2007
Posts: 51

Posted: 4/15/2010 7:58:01 AM

Interesting, looks like the objEvents object is null. In line 73 its trying to get set from the session object but the session must not exist. I am not sure what the problem is.

Can you send a screenshot of what this looks like before you get the error or better yet, send me a private message with the URL of this site so I can do some testing to find the problem. Thanks.

ASPCalendarsAdmin


Administrator

Join Date: 12/12/2007
Posts: 51

Posted: 4/15/2010 10:43:09 AM

It appears you turned off the grid Pager in AdminManageEvents.ascx. If you turn that off you are going to have to replace the following code

gvEvents.PageIndex * gvEvents.PageSize + Me.gvEvents.SelectedIndex


with:

Me.gvEvents.SelectedIndex



  Copyright ASP Calendars DMG Forums 3.1