RE: Run code between Intranet and Internet servers
From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 03/16/04
- Next message: Miha Markic [MVP C#]: "Re: Intra-Thread communication"
- Previous message: Just Tom: "Intra-Thread communication"
- In reply to: Brian Bradley: "Run code between Intranet and Internet servers"
- Next in thread: Steven Cheng[MSFT]: "RE: Run code between Intranet and Internet servers"
- Reply: Steven Cheng[MSFT]: "RE: Run code between Intranet and Internet servers"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 07:02:45 GMT
Hi Brain,
>From your description, you have two web apps on two different server(one
intranet and other internet). In one intranet page, you'd like to redirect
to another page on the internet server , after some certain operations
,then redirect back to the intranet page and continue to execute some
following code, yes?
If there is anything I misunderstood, please feel free to let me know.
As for this quesiton, here are my suggestions:
1. As for your situation, the two pages are in different application, we
can only use Response.Redirect to forward between them. The server.Transfer
or server.Execute are all restricted to forward between pages in the same
web application.
2.The Response.Redirect method will started a new request (ended the
current one) with the new specified url. This is executed whenever the
Redirect is called , no matter the codebehind function has finished or not.
In fact, the request and the serverside codebehind code's execution will be
asynthronous after calling the Response.Redirect. That's impossbile to
waitting for the internet page redirect back and continute to execute from
the nextline code in the intranet page's codebehind code, do you think so?
3. If you do want to forward to the internet page and redirect back to the
intranet page to continue some following work, I think you may try the
following approach:
In the intranet page, you still can use Response.Redirect to redirect to
the internet page, and after the internet page finished operations redirect
back to the intranet page, however, you need to add some querystring in the
certain redirect url. For example:
#in internet page after operations finished:
Response.Redirect("http://intranetserver/intranet_page.aspx?state=return");
Then in the intranet page's Page_Load event, you can retrieve the certain
querystring and determine what to do according to the "state" querystring
's value, for example:
private void Page_Load(object sender, System.EventArgs e)
{
if(Request.QueryString["state"] != null)
{
if(Request.QueryString["state"] == "return")
{
//code to continue the work
}
}
}
Also, you can add other querystring to contain some other state info values
to indicate how to continue work in the original page. Hope this helps.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
- Next message: Miha Markic [MVP C#]: "Re: Intra-Thread communication"
- Previous message: Just Tom: "Intra-Thread communication"
- In reply to: Brian Bradley: "Run code between Intranet and Internet servers"
- Next in thread: Steven Cheng[MSFT]: "RE: Run code between Intranet and Internet servers"
- Reply: Steven Cheng[MSFT]: "RE: Run code between Intranet and Internet servers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|