Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Doing a serverside post and ending up at post server

Reply
Thread Tools

Doing a serverside post and ending up at post server

 
 
John Dalberg
Guest
Posts: n/a
 
      09-23-2004
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


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      09-23-2004
Response.Redurect("user(E-Mail Removed)")


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


"John Dalberg" <(E-Mail Removed)> wrote in message
news:zh8rsb57htlk$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
John Dalberg
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 09:38:01 -0500, Curt_C [MVP] wrote:

> Response.Redurect("user(E-Mail Removed)")


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
 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      09-23-2004
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" <(E-Mail Removed)> wrote in message
news:zh8rsb57htlk$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      09-23-2004
Ahh...
Could you do the FORM and POST it to "user(E-Mail Removed)" (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" <(E-Mail Removed)> wrote in message
news:1je71cxfp069m$(E-Mail Removed)...
> On Thu, 23 Sep 2004 09:38:01 -0500, Curt_C [MVP] wrote:
>
>> Response.Redurect("user(E-Mail Removed)")

>
> 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



 
Reply With Quote
 
John Dalberg
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:

> Ahh...
> Could you do the FORM and POST it to "user(E-Mail Removed)" (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
 
Reply With Quote
 
John Dalberg
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:

> Ahh...
> Could you do the FORM and POST it to "user(E-Mail Removed)" (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
 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      09-23-2004
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" <(E-Mail Removed)> wrote in message
news:1p79gpzkbag55$(E-Mail Removed)...
> On Thu, 23 Sep 2004 11:02:29 -0500, Curt_C [MVP] wrote:
>
>> Ahh...
>> Could you do the FORM and POST it to "user(E-Mail Removed)" (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



 
Reply With Quote
 
John Dalberg
Guest
Posts: n/a
 
      09-23-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client and Serverside Script =?Utf-8?B?UHJhc2hhbnQgQw==?= ASP .Net 2 08-10-2007 07:48 AM
Need OnClick ServerSide and ClientSide Event Handler PK9 ASP .Net Web Controls 1 03-07-2005 03:19 AM
Cache objects on serverside and given intervals (timer?) =?Utf-8?B?RHVzdGluIElJLg==?= ASP .Net 1 11-23-2004 01:19 PM
Serverside javascript and vbscript on same page? Robert Mark Bram ASP General 4 08-15-2004 07:01 AM
Displaying Progress info to client while ServerSide code executes. Chris Tillotson ASP .Net 2 11-04-2003 09:03 PM



Advertisments