Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   ASP.Net (http://www.xtremevbtalk.com/asp-net/)
-   -   POST after a POST (http://www.xtremevbtalk.com/asp-net/326184-post-post.html)

lamy 07-11-2013 07:51 AM

POST after a POST
 
basically i'm looking for a way to POST to another page after receiving a POST from another page, web client or web request can do this but it is server-side, i needed to POST to a page and POST it automatically to another

here's what i currently have, it works but im still looking for an alternative if there is:

i have 3 sites that will be integrated
  1. Site 1: Front-end - this is where they will input the required data
  2. Site 2: Pass-through - this will handle the redirection depending on what domain it came from
  3. Site 3: Fulfillment - this is where the data is processed (HTTP POST only)

everything is entered in Site 1, submission will happen by POSTing to Site 2
Site 2 will validate everything and forwards (HTTP POST) the data to Site 3
Site 3 will process the data and returns the result to Site 2
Site 2 will then forward the result back to Site 1

Site 3 can be configured but it is designed only to return the result to single URL, hence the need for a pass-through so it can forward the result to its proper requester in-case another Site 1 will use it

anyone?

Qua 07-11-2013 11:16 PM

I'm not sure what you are asking? From your back-end it is entirely possible to do web requests however you want to. .NET provides several alternatives for doing so. I would suggest that you take a look at one of these 3 alternatives:
  • HttpClient: A recently added class that is designed around making web requests easy. This is the newest alternative, and I would suggest using this one if possible.
  • WebClient: The predecessor to HttpClient. Has much of the same functionality and is available in previous versions of .NET
  • HttpWebRequest: Requires a bit more work to get going, and the two other components are built upon this one.
Either of these three will let you do posts across sites rather easily. If you're on a newer version of .NET (4.0/4.5) I would strongly suggest that you use the HttpClient.

lamy 07-12-2013 04:02 AM

thanks Qua, but i was looking for something that is close to redirection via HTTP POST

basically i'm looking for another way to have 1st domain to post to 2nd domain which will automatically post to the 3rd domain (all HTTP POST)

this is because the 3rd domain will post back after processing another set of inputs to the 2nd domain only (HTTP POST), it is designed to return only to 2nd domain, so the last redirection is handled by the 2nd domain, more like a middle man

doing this at back-end is not an option since the 3rd domain will require another set of inputs and possibly do the same

Qua 07-12-2013 04:10 AM

It is not possible server side to get the client to issue a post. The best you can do is a redirection which by nature is GET-orientated.

Even when you're client side you cannot do cross site posting with Javascript.

lamy 07-12-2013 04:19 AM

thanks Qua

i guess i'd have to settle with how i'm doing it now

cheers!


All times are GMT -6. The time now is 11:45 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.