response.redirect doesnt work
<p>When control reaches response.redirect line then the following error is produced in browser.
the url in response.redirect is correct.<br>
The page isn't redirecting properly</p>

<p>Firefox has detected that the server is redirecting the request for this address in a way that will never complete.</p>

<pre><code>*   This problem can sometimes be caused by disabling or refusing to accept
      cookies.
</code></pre>

<p>here is the code</p>

<pre><code>using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage
{    
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void imgbtnLogin_Click(object sender, ImageClickEventArgs e)
   {
        UserFunction objUser = new UserFunction();
        UserProperties objUserProperties = new UserProperties();
        IUserFunction iUserFunction = (IUserFunction)objUser;
        objUserProperties.UserName = txtUserName.Text;
        objUserProperties.Password = txtPassword.Text;
        string userName = txtUserName.Text; ;
        string password = txtPassword.Text; ;
        DateTime login = DateTime.Now;
        DateTime? logout = null;
        int UserId;
        string StartUpPage;
        bool success = iUserFunction.ValidateUser(objUserProperties, out StartUpPage);
        if (success)
        {
            Session["UserId"] = objUserProperties.UserId;
            Session["RoleId"] = objUserProperties.RoleId;
            Session["UserName"] = objUserProperties.UserName;
            Session["MyTheme"] = objUserProperties.Theme;
            iUserFunction.AddLoginHistory(objUserProperties.UserId, login, logout, 1);
            Response.Redirect(StartUpPage);

        }
        else
        {
            Label1.Text = "Wrong UserName/password.";
            //ScriptManager.RegisterStartupScript(this, this.GetType(), "ClientScript", "alert('Invalid Credential');", true);
        }
    }
}
</code></pre>
