views:

48

answers:

1

I'm currently debugging an ASP.NET MVC application that was just deployed to a different server.

All the versions between the staging server and the production server are the same, but in the production server (which is 64bit, but is running the app in 32bit mode) I'm getting a timeout in this controller action:

    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Create(Person person, PeopleCertificationLevel peopleCertificationLevel, Address address)
    {
        try
        {
            person.PeopleCertificationLevels.Add(peopleCertificationLevel);
            person.Addresses.Add(address);
            _peopleService.SavePerson(person);
            SetMessage("O marítimo foi registado com sucesso.");
            return Redirect("~/People/Show/" + person.ID);
        }
        catch
        {
            SetErrorMessage("Por favor valide e preencha devidamente os campos assinalados a asterisco (*).");
            Create();
            return View(person);
        }
    }

I've already tried throwing an exception before the try block, but I always get a request timeout here.

It seems to me that the request isn't getting to this action. Any suggestions on how I should debug this or what should I do?

UPDATE: I figured it has to do with the model binding. If I remove the bindings, the request gets dispatched, FAST. However, i've tried several approaches, such as using the Bind attribute before the action parameters, tried creating a NewPersonForm class which contained 3 properties (Person, PeopleCertificationLevel, Address), and even tried with a FormCollection and UpdateModel calls. All to no avail.

UPDATE 2: This application is compiled in 32bit and running in a 64bit environment. Although 32bit applications are enabled in the AppPool, I suspect that is what might be causing the problem.

+1  A: 

It may not be this silly .. but just my 2 cents

  • did you actually check if the form is posted through a submit button ?
  • are all the parameters exactly matching with the names specified in the routing ?

Thanks,
Mahesh Velaga.

Mahesh Velaga
Yes, everything is OK. On my machine, it works fine, even with the ASP Development Server (the one VS2008 launches by default). In this machine, this is the only form that doesn't wory.
changelog