Posting data from one asp.net page to another

Ok I've done enough research but can't seem to find a solution. Its from one application page to another application page. Since I will be sending the username and password, I cannot send it as "getT", so I need to make a "message". I'll be using ssl though - not sure if that helps. so I cannot use sessions in my applications and use those shared sessions like databsae is a performance killer Also, once the user clicks on a link on the original page, I need to do some post processing and then send a message to another page to use the form and stuff not work.

any help

fyi: What I am trying to achieve is that a person, when registering in application A, clicks on some link, I do not process and do not want to pass them to application B, where they should not be overwritten in application B, but instead, automatically login.

+1


a source to share


4 answers


I think you are looking for a single site solution .



0


a source


We use Global.asax to do exactly what you describe. Assuming both web applications are using the same business domain. You can use the following to set up a registered user on our business domain. Then you can use the presence of this property to know not to prompt for login again in the second web application.



    /// <summary>
    ///     Event fires when an HTTP request is made to the application.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Application_PreRequestHandlerExecute(object sender, EventArgs e)
    {
        // If we don't have a logged in user.
        if (<BusinessDomain>.Constants.LoggedInUserID == null)
        {
            // Ensure that Context.Handler for this particular HTTP request implements an interface that uses a Session State.
            if (Context.Handler is IRequiresSessionState || Context.Handler is IReadOnlySessionState)
            {
                if (Session != null)
                {
                    // Set the currently logged in user in our Business Domain.
                    if ((Guid)Session["UserID"] != Guid.Empty)
                    {
                        <BusinessDomain>.Constants.LoggedInUserID = Session["UserID"];
                    }
                }
            }
        }
    }

      

+2


a source


This may not be the best solution, but you can use cookies.

+1


a source


Agree with Thomas, sounds specifically for solving one sign. Multiple web applications using the same sign, so as soon as you enter one application you are logged into all these membership provider links.

http://weblogs.asp.net/scottgu/archive/2006/05/07/ASP.NET-2.0-Membership-and-Roles-Tutorial-Series.aspx

http://dotnetslackers.com/ASP_NET/re-29031_ASP_NET_2_0_Implementing_Single_Sign_On_SSO_with_Membership_API.aspx

hope it helps

0


a source







All Articles