J
Jeremy Olmstead
I have a page that uses a button with attribute postbackurl set to a
different page. The page that it posts to is in a different directory
that is secured via forms authentication. When it's clicked sometimes it
works by redirecting to the login in page, but it usually doesn't. The
page that comes up in Firefox basically says "The connection to the
server was reset while the page was loading". In Internet Explorer I get
a similar error, but if I refresh the page it works by redirecting to the
login page every time. Refreshing does not always work in Firefox but it
does sometimes. Also if I try to start debugging right from the protected
file /members/checkout.aspx it correctly redirects to the log in page.
Any idea what I could be doing wrong? Some relevant code below...
Button Definition
-----
<asp:Button ID="checkOutButton" runat="server" CssClass="myButton"
Text="Check Out" PostBackUrl="~/members/checkout.aspx" />
-----
Relevant web.config Section
-----
<system.web>
<authentication mode= "Forms">
<forms name=".ASPXAUTH" loginUrl="~/login.aspx" protection="All" />
</authentication>
</system.web>
<location path="members">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
-----
checkout.aspx
-----
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="checkout.aspx.vb" Inherits="members_checkout" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
-----
checkout.aspx.vb
-----
Partial Class members_checkout
Inherits System.Web.UI.Page
End Class
-----
different page. The page that it posts to is in a different directory
that is secured via forms authentication. When it's clicked sometimes it
works by redirecting to the login in page, but it usually doesn't. The
page that comes up in Firefox basically says "The connection to the
server was reset while the page was loading". In Internet Explorer I get
a similar error, but if I refresh the page it works by redirecting to the
login page every time. Refreshing does not always work in Firefox but it
does sometimes. Also if I try to start debugging right from the protected
file /members/checkout.aspx it correctly redirects to the log in page.
Any idea what I could be doing wrong? Some relevant code below...
Button Definition
-----
<asp:Button ID="checkOutButton" runat="server" CssClass="myButton"
Text="Check Out" PostBackUrl="~/members/checkout.aspx" />
-----
Relevant web.config Section
-----
<system.web>
<authentication mode= "Forms">
<forms name=".ASPXAUTH" loginUrl="~/login.aspx" protection="All" />
</authentication>
</system.web>
<location path="members">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
-----
checkout.aspx
-----
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="checkout.aspx.vb" Inherits="members_checkout" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
-----
checkout.aspx.vb
-----
Partial Class members_checkout
Inherits System.Web.UI.Page
End Class
-----