Doing a serverside post and ending up at post server

Discussion in 'ASP .Net' started by John Dalberg, Sep 23, 2004.

  1. John Dalberg

    John Dalberg Guest

    Hello

    For a single signon solution, I am putting a login form for a remote server
    on my own site. When the form gets posted, the asp.net creates a
    httpwebrequest object, does the post, gets the request, flushes the current
    response object, puts the response from the post into the current post and
    it gets sent back to the browser. The browser shows the after login page
    correctly.

    The problem is that the browser's url is still showing the original url. I
    want the browser to show the remote url as if I am logged in into their
    site.

    If I try response.redirect, I am at the remote's site login page. Their
    site doesn't use cookies. response.redirectlocation doesn't work either.

    John Dalberg
     
    John Dalberg, Sep 23, 2004
    #1
    1. Advertising

  2. John Dalberg

    Curt_C [MVP] Guest

    Response.Redurect("user:p")


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "John Dalberg" <> wrote in message
    news:zh8rsb57htlk$...
    > Hello
    >
    > For a single signon solution, I am putting a login form for a remote
    > server
    > on my own site. When the form gets posted, the asp.net creates a
    > httpwebrequest object, does the post, gets the request, flushes the
    > current
    > response object, puts the response from the post into the current post and
    > it gets sent back to the browser. The browser shows the after login page
    > correctly.
    >
    > The problem is that the browser's url is still showing the original url. I
    > want the browser to show the remote url as if I am logged in into their
    > site.
    >
    > If I try response.redirect, I am at the remote's site login page. Their
    > site doesn't use cookies. response.redirectlocation doesn't work either.
    >
    > John Dalberg
    >
    >
     
    Curt_C [MVP], Sep 23, 2004
    #2
    1. Advertising

  3. John Dalberg

    John Dalberg Guest

    On Thu, 23 Sep 2004 09:38:01 -0500, Curt_C [MVP] wrote:

    > Response.Redurect("user:p")


    That won't work for an html based form, plus the form has hidden fields
    whose values are created dynamically for session tracking. Part of my
    asp.net code is doing html scraping to get these values before I do a post
    server side.

    John
     
    John Dalberg, Sep 23, 2004
    #3
  4. John Dalberg

    bruce barker Guest

    the url in the browser matches the request, and the only way to change it is
    thru a redirect (which causes a new browser request). this is to prevent
    what your are trying to do, create a Trojan horse.

    -- bruce (sqlwork.com)


    "John Dalberg" <> wrote in message
    news:zh8rsb57htlk$...
    > Hello
    >
    > For a single signon solution, I am putting a login form for a remote

    server
    > on my own site. When the form gets posted, the asp.net creates a
    > httpwebrequest object, does the post, gets the request, flushes the

    current
    > response object, puts the response from the post into the current post and
    > it gets sent back to the browser. The browser shows the after login page
    > correctly.
    >
    > The problem is that the browser's url is still showing the original url. I
    > want the browser to show the remote url as if I am logged in into their
    > site.
    >
    > If I try response.redirect, I am at the remote's site login page. Their
    > site doesn't use cookies. response.redirectlocation doesn't work either.
    >
    > John Dalberg
    >
    >
     
    bruce barker, Sep 23, 2004
    #4
  5. John Dalberg

    Curt_C [MVP] Guest

    Ahh...
    Could you do the FORM and POST it to "user:p" (as the
    ACTION)? The remote page should be able to use all your FORM field values
    then.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "John Dalberg" <> wrote in message
    news:1je71cxfp069m$...
    > On Thu, 23 Sep 2004 09:38:01 -0500, Curt_C [MVP] wrote:
    >
    >> Response.Redurect("user:p")

    >
    > That won't work for an html based form, plus the form has hidden fields
    > whose values are created dynamically for session tracking. Part of my
    > asp.net code is doing html scraping to get these values before I do a post
    > server side.
    >
    > John
     
    Curt_C [MVP], Sep 23, 2004
    #5
  6. John Dalberg

    John Dalberg Guest

    On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:

    > Ahh...
    > Could you do the FORM and POST it to "user:p" (as the
    > ACTION)? The remote page should be able to use all your FORM field values
    > then.


    Hmm.. well... the remote login is an html form which has hidden fields with
    dynamic values. This means MY form needs to have these hidden fields also
    which means before MY home page loads up, it needs to make a call to the
    remote login page, get these values, plug them into my form before it
    displays. I guess I have to code this functionality to test. I'll give it a
    shot. Thanks.

    John
     
    John Dalberg, Sep 23, 2004
    #6
  7. John Dalberg

    John Dalberg Guest

    On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:

    > Ahh...
    > Could you do the FORM and POST it to "user:p" (as the
    > ACTION)? The remote page should be able to use all your FORM field values
    > then.


    How can you use post to a remote server without Javascript and get redirect
    to the remote server? A simple Response.Redirect won't do.

    John
     
    John Dalberg, Sep 23, 2004
    #7
  8. John Dalberg

    Curt_C [MVP] Guest

    have you looked at using XMLHTTP to query the remote page for the info?

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "John Dalberg" <> wrote in message
    news:1p79gpzkbag55$...
    > On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:
    >
    >> Ahh...
    >> Could you do the FORM and POST it to "user:p" (as
    >> the
    >> ACTION)? The remote page should be able to use all your FORM field values
    >> then.

    >
    > Hmm.. well... the remote login is an html form which has hidden fields
    > with
    > dynamic values. This means MY form needs to have these hidden fields also
    > which means before MY home page loads up, it needs to make a call to the
    > remote login page, get these values, plug them into my form before it
    > displays. I guess I have to code this functionality to test. I'll give it
    > a
    > shot. Thanks.
    >
    > John
     
    Curt_C [MVP], Sep 23, 2004
    #8
  9. John Dalberg

    John Dalberg Guest

    On Thu, 23 Sep 2004 12:59:10 -0500, Curt_C [MVP] wrote:

    > have you looked at using XMLHTTP to query the remote page for the info?


    I am not sure why I should use it. I able to query everything I need. My
    problem is having my browser show the remote url after doing ll the
    processing on the server wide. I am also staying away from using Javascript
    and object on the client side.

    I actually have a Javascript solution where the server creates a form
    dynamically with the hidden fields and a render-time javascript which
    automatically submits the form on load. It doesn't work for javascript
    disabled browsers. That's why I am looking for a non Javascript dependent
    solution.

    John
     
    John Dalberg, Sep 23, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Tillotson
    Replies:
    2
    Views:
    435
    Chris Tillotson
    Nov 4, 2003
  2. =?Utf-8?B?RHVzdGluIElJLg==?=

    Cache objects on serverside and given intervals (timer?)

    =?Utf-8?B?RHVzdGluIElJLg==?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    366
    Karl Seguin
    Nov 23, 2004
  3. =?Utf-8?B?UHJhc2hhbnQgQw==?=

    Client and Serverside Script

    =?Utf-8?B?UHJhc2hhbnQgQw==?=, Aug 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    285
    Eliyahu Goldin
    Aug 10, 2007
  4. PK9
    Replies:
    1
    Views:
    326
  5. Robert Mark Bram

    Serverside javascript and vbscript on same page?

    Robert Mark Bram, Aug 15, 2004, in forum: ASP General
    Replies:
    4
    Views:
    229
    Evertjan.
    Aug 15, 2004
Loading...

Share This Page