Postbackurl Intermittently Working

  • Thread starter Jeremy Olmstead
  • Start date
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
-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top