Iv just added in some sightings from today and was starting to edit the comments in when I click update sightings I get this error below. These have also been added to the correct forum for addition to the database so I don't know if the 2 are connected with this error
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:
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.]
PlaneLogger.Controllers.SightingController.Edit(Sighting sighting, HttpPostedFileBase[] files) in C:\Users\Gavin Coates\Documents\Projects\PlaneLogger\PlaneLogger\Controllers\SightingController.cs:211
lambda_method(Closure , ControllerBase , Object[] ) +170
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +269
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +34
System.Web.Mvc.<>c_DisplayClass13.b_10() +79
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +474
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +2574
System.Web.Mvc.Controller.ExecuteCore() +113
PlaneLogger.Controllers.BaseController.ExecuteCore() in C:\Users\Gavin Coates\Documents\Projects\PlaneLogger\PlaneLogger\Controllers\BaseController.cs:106
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
System.Web.Mvc.Async.<>c_DisplayClass1.b_0() +25
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +10
System.Web.Mvc.<>c_DisplayClass8.b_3(IAsyncResult asyncResult) +44
System.Web.Mvc.Async.<>c_DisplayClass4.b_3(IAsyncResult ar) +25
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +10
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8815
System.Web.<>c__DisplayClass285_0.b__0() +41
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +155
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +1401
Hi
were you trying to edit sightings that are red (ie not in the database) you cannpt edit/add anything until it is actually added as a database record
I get similar issues trying to add photos to red records
you will be able to do comments etc AFTER it has been added , but you will have to relog your sighting to the new record when it is added
hope this helps
Paul
You need to log in to post a reply to this topic.