+3  A: 

These articles have workarounds that should do what you need.

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx http://blogs.iis.net/ruslany/archive/2008/10/23/asp-net-postbacks-and-url-rewriting.aspx


I belive that your problem is the same as the one affecting anyone using URL Rewriting. Although the methods are very different they both cause a mismatch between where the page is and where the system thinks the pages is.

Quick question- Are you by any chance using 3.5 SP1?
If so you may be able to set the form action manually - Basically something along the lines of

<form ID="ImAForm" action="~/Account.aspx" runat="server>

Unfortunately I can't be sure whether this is the same problem or not. Logically it does seem to be the same issue but I can't find anything specific to pathInfo and most of my experience is with URL rewriting. If you don't have SP1 you can't easily override the form action so the next thing to try would be the methods referenced in the first blog...

Here are the relevant bits of the article...

Handling ASP.NET PostBacks with URL Rewriting

One gotcha that people often run into when using ASP.NET and Url-Rewriting has to-do with handling postback scenarios. Specifically, when you place a control on a page, ASP.NET will automatically by default output the "action" attribute of the markup to point back to the page it is on. The problem when using URL-Rewriting is that the URL that the control renders is not the original URL of the request (for example: /products/books), but rather the re-written one (for example: /products.aspx?category=books). This means that when you do a postback to the server, the URL will not be your nice clean one.

With ASP.NET 1.0 and 1.1, people often resorted to sub-classing the control and created their own control that correctly output the action to use. While this works, it ends up being a little messy - since it means you have to update all of your pages to use this alternate form control, and it can sometimes have problems with the Visual Studio WYSIWYG designer.

The good news is that with ASP.NET 2.0, there is a cleaner trick that you can use to rewrite the "action" attribute on the control. Specifically, you can take advantage of the new ASP.NET 2.0 Control Adapter extensibility architecture to customize the rendering of the control, and override its "action" attribute value with a value you provide. This doesn't require you to change any code in your .aspx pages. Instead, just add a .browser file to your /app_browsers folder that registers a Control Adapter class to use to output the new "action" attribute:

Hope that helps - And sorry I wasn't more clear in my initial post. If this doesn't do the trick let me know...

apocalypse9
I'm sorry, but I couldn't find anything to help me in those posts. I couldn't find the workaround in the first post, and the second post seems to be related to URL rewriting (similar). If I'm completely and utterly wrong, I wonder if you could clarify? :) Thanks for your time.
Lucas Jones
I'm adding my response to my answer as there isn't enough room here.
apocalypse9
Thanks. I'll try that. Sorry for not responding until today - the recent updates thing seems a bit dodgy :).
Lucas Jones
No worries- Yeah the recent updates thing has been a bit iffy for me too lately. Hope that does what you need!
apocalypse9