Sys.WebForms.PageRequestManagerServerErrorException: & hellip; The status code returned by the server was: 404


I have seen a few posts regarding this issue but not one specific to my problem and I have no ideas as to what I need to do to debug this.

I have some combo boxes on an aspx pages, when I select a value from the first one, it fills the second with value and so on with the third and fourth. This works with no problems until I wrap an UpdatePanel around the combo boxes and try to "ajaxify" the whole process so the page isn't dancing around. The exact error I get is:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404

Some things to note:

  1. I am using URL rewriting - This is what I think is causing the problem
  2. The error will occur whenever I choose a selection for a SECOND time. This means that I could select a value from the first combo box and get the same error (so it is happening on the second postback - No matter which combo box it's from).

I have tried setting the EnablePartialRendering="false" on teh scriptmanager but as I said, it works when not using ajax, so I don't know how to debug the issue.

My server is Windows 2008 running IIS& with ASP.NET 2.0.

I would really appreciate your help

Thanks in advance.

Ok, I have managed to find a solution ... minutes after posting.

I used HTTPWatch to get the URL the request was being posted to. This showed me the URL was Appending to the existing URL each post and not overwriting. I used some JavaScript at the top of my page to set the forms URL to the window location:

    var form = Sys.WebForms.PageRequestManager.getInstance()._form;
    form._initialAction = form.action = window.location.href;

This sorted it.

Hope it helps someone else.