Everything was working fine until I added a url rewrite that trims off the default.aspx from a page request. Once I added that all postbacks on default pages go back to the server, but do not fire the correct event.
The site is .net 2.0 (.net 4.0 is installed, but this site is not using it) The IIS server is version 7.5
Url rewrite rule:
<rule name="Default Document URL Rewrite" stopProcessing="true">
<match url="(.*?)/?Default\.aspx$" />
<action type="Redirect" url="{R:1}" />
</rule>
Sample markup code:
<form id="form1" runat="server">
<asp:Button runat="server" ID="btnPostBack" Text="Post Back"
OnClick="btnPostBack_Click" />
<asp:Label runat="server" ID="lblDone" />
</form>
Sample code behind:
protected void btnPostBack_Click(object sender, EventArgs e)
{
lblDone.Text = "Postback worked!";
}
NOTE: The action attribute of the form is not being rendered blank, so adding a line of code in the page_load to fill it explicitly with the Request.RawUrl, like suggested here: http://ruslany.net/2008/10/aspnet-postbacks-and-url-rewriting, did not work.
Neither did adding a Forms ControlAdapter like recommended here: Postback doesn't work with aspx page as Default Document.
Thank you in advance for your assistance!