Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are deploying an MVC2 based app on IIS at production environment floating in Internet. An error occurs and this is the process to raise it:

  1. The user clicks on a link to display a web form
  2. The user inserts data.
  3. The user submits the form.
  4. The application shows an error. Its trace shows that a reference for an object is not set to an instance. Apparently MVC's engine loses HTTP POST request data regarding to the model so the system assigns a null for actions's parameter at an unspecified time in the action's execution.

On Testing environment, at our intranet, this problem never had happened.

Here is the error:

// Error
Exception Error: Object reference not set to an instance of an object.
Exception Source: MagaARPIU
Exception Data: System.Collections.ListDictionaryInternal
Exception Trace: at MagaARPIU.Areas.GestionComercial.Controllers.ProspectacionController.IngresarEmpresa(InfoEmpresa modelo) in C:\Desarrollo\calvarez\codigo\Gacela ARP - Publicaciones\Gacela ARP\Maga\MagaARPIU\Areas\GestionComercial\Controllers\ProspectacionController.cs:line 151 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)


// -- ProspectacionController.cs

105        [RolAuthorizationAttribute]
106        public ActionResult IngresarEmpresa()
107        {
108            var modelo = new InfoEmpresa();
                ...
113            modelo.DatosIdentificacion = new DatosIdentificacion();
                ...
137            return View("IngresarEmpresa1", modelo);
                ...
139         }

145        [HttpPost]
146        [RolAuthorizationAttribute]
147        public ActionResult IngresarEmpresa(InfoEmpresa modelo)
148        {
                ...
151            if (!modelo.DatosIdentificacion.Completo)
152            {
                ...
179            }
                ...
305        }

Do you know what is going on and how to solve this problem?

share|improve this question
    
Maybe. Maybe a better error description would help. –  TomTom Jan 28 '11 at 19:55
    
Thanks for your interest... we are very worried... –  JPCF Jan 28 '11 at 20:06

1 Answer 1

Did you double-check if the correct version of View files are deployed? Maybe they were copied but not refreshed on the production server after you've made some changes?

Another hint: is it connected to some session or cookie issues? You are some questions to ask and some suggestions:

  • Can you reproduce it?
  • Does it happen with different browsers/versions?
  • Use a HTTP analyzer like Fiddler to debug the information (form, http headers etc.) travelling from the client to the server

In your case I assume it has something to do with the authentication mode. Maybe in your intranet you're automatically authenticated because you're all Windows domain users. But I assume that your production server is outside your Windows domain, so that configuration does not apply.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.