473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Server.Transfer method...

Hi All,

Got a quick query in relation to the Server.Transfer method available in IIS
5+/ASP. I've got an issue where I want to take a portion of an online app and
extract this out into a web site on its own, so I will end up having two web
sites. This planned to aid problems we've been having with performance, as if
the portion (which is an app in its own right) has problems we then have to
restart the whole site and so bring everything down just because of the
portion of the app which we're having issues with. Taking the portion of the
site will allow us to run it in isolated mode in ISS and so just restrat that
if needed, while not affecting the rest of IIS.

Anyways, I'm in the process of writing a jump page to facilitate the process
of moving from the first site to the new second site, but as we need to reuse
session info created in site 1 I need a way of passing this over to the
second site.

I've been aware of the Server.Transfer but never really used it so I'm not
too sure how I can actually use this. I was planning to write an ASP page
that takes the required info out of session is site 1, calling
Server.Transfere to send it over to the second site. I don't want to do a
Response.Redirect, not wanting the client to do this and not allowing it to
know what info I'm using in the session.

And so, I thought the Server.Transfer would facilitate this, but after
reading some of the documentation on MSDN I'm not sure I can, ie: redirect to
another ASP page in this way and tack on a QueryString holding all the
session info I need, as MSDN says that I'll get an 'ASP 0173 error, "Invalid
Path Character"' error if I have a question-mark '?' in the path, or any
other of a list of invalid chars. But then I need this '?' char to build my
QString ie: XXX.asp?sas=123&jdy=0689...

So what I'm after is some clarification that I can use Server.Transfere in
this way or not, ie to redirect to an ASP page and tack on a QueryString, of
if it just allows for an ASP page without s QString. So then if I want to do
this I might need to use the Response.Redirect method, or some other way!!

MSDN also says: "When you use the Transfer method, the state information for
all the built-in objects are included in the transfer. This means that any
variables or objects that have been assigned a value in session or
application scope are maintained"

....So will I have the session info from site 1 available in site 2 after the
redirect or does this only apply for a Server.Transfer within the same web
(which I think is what it means!).

I don't have an environment up that I can test this on yet so I'm kinda
feeling may wat in the dark here, hence my lengthly post.

As always any ideas/ suggestion most welcome, and thanks for taking the time
to read my lengthly post, sorry not as quick as first mentioned. (I hope I
haven't gone over MSDN's max post length here!!)

Cheers,

Stephen.
Jul 22 '05 #1
6 2211
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:
So what I'm after is some clarification that I can use
Server.Transfere in this way or not


Think of it this way:

An asp page is executed in the serverside asp engine, and renders html that
is sent to the client, bearing only the .asp extention in name.

A server.transfer just transfes the asp-code executuin to another page, and
the rendering of the htmp goes on, while the client apparent name still is
the name of the first page.

This is nearly the same as a serverside include, exept that the include is
done before the asp-engine starts executing the asp code, and with
server.transfer that execution has already started.

Server.execute acts nearly the same as server.transfer, exept that the code
goes on on the original "calling" page after the executed page ends.

This in not the spec, but the way I "feel" about these command statements.

For specs see the NG Faq or MDSN, I think

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #2
....So, I can't use Server.Transfer like I would Response.Redirect, will the
ASP script engine throw a fit if I attempt to tack on a QueryString in the
transfer? I understand wot ur saying when u say there like server-side
includes, and that u can't tack on a QueryString there either, as its simply
an include and not a redirect! So Server.Transfer will act in the same way !?

Where are all those MS MCP's when you need them !?

"Evertjan." wrote:
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:
So what I'm after is some clarification that I can use
Server.Transfere in this way or not


Think of it this way:

An asp page is executed in the serverside asp engine, and renders html that
is sent to the client, bearing only the .asp extention in name.

A server.transfer just transfes the asp-code executuin to another page, and
the rendering of the htmp goes on, while the client apparent name still is
the name of the first page.

This is nearly the same as a serverside include, exept that the include is
done before the asp-engine starts executing the asp code, and with
server.transfer that execution has already started.

Server.execute acts nearly the same as server.transfer, exept that the code
goes on on the original "calling" page after the executed page ends.

This in not the spec, but the way I "feel" about these command statements.

For specs see the NG Faq or MDSN, I think

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #3
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:
"Evertjan." wrote:
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:
> So what I'm after is some clarification that I can use
> Server.Transfere in this way or not
Think of it this way:

An asp page is executed in the serverside asp engine, and renders
html that is sent to the client, bearing only the .asp extention in
name.

A server.transfer just transfes the asp-code executuin to another
page, and the rendering of the htmp goes on, while the client
apparent name still is the name of the first page.

This is nearly the same as a serverside include, exept that the
include is done before the asp-engine starts executing the asp code,
and with server.transfer that execution has already started.

Server.execute acts nearly the same as server.transfer, exept that
the code goes on on the original "calling" page after the executed
page ends.

This in not the spec, but the way I "feel" about these command
statements.

For specs see the NG Faq or MDSN, I think


[please don't toppost on usenet. It is against netiquette.
Topposting corrected]
...So, I can't use Server.Transfer like I would Response.Redirect,
will the ASP script engine throw a fit if I attempt to tack on a
QueryString in the transfer? I understand wot ur saying when u say
there like server-side includes, and that u can't tack on a
QueryString there either, as its simply an include and not a redirect!
I don't think you understand, a redirect is a header command sent to the
client browser to call another page.
So Server.Transfer will act in the same way !?
Please reread my explanation, and try it out on your own system.
Where are all those MS MCP's when you need them !?


Aren't you acting like this is a paid helpline?

If you want to send data serverside from one page to another, use sesion
variables.

If you want to send serverside data to an include, the vbscript or
jscript variable will be valid.

Try it out!!
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #4
Hi Evertjan,
I don't think you understand, a redirect is a header command sent to the client browser to call another page.

Did I ask about http headers, or what they were? I know what a redirect is
and what server.transfer is doing, I'm querying the limits of it's use.
Aren't you acting like this is a paid helpline?
That was humour, maybe u've heard of it... then again, I am trying to get
expert advice from an MCP, not some re-hash of what I already know. Did you
even read my query? You didn't even touch on the main aspect: Can I add a
QueryString when doing a redirect using server.transfer! You got all busy
explaining what headers are and the ASP script engine.... did I ask that!
If you want to send data serverside from one page to another, use sesion variables.

As I mentioned in my origianl post i'm already using session variables, but
I now want to attempt to share this session between two sites. And before you
write back and tell me you can't do this, let me just add... I KNOW! Again
this proves you didn’t read the question! (Estimating ur response so far,
this is where you might say: why don't you use a redirect!!)
Aren't you acting like this is a paid helpline?

Your acting like you know the answer, but you don't, so I suggest if you
don't know then don't reply! You just end up wasting people’s time!

"Evertjan." wrote:
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:
"Evertjan." wrote:
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 20 mei 2005 in
microsoft.public.inetserver.asp.general:

> So what I'm after is some clarification that I can use
> Server.Transfere in this way or not

Think of it this way:

An asp page is executed in the serverside asp engine, and renders
html that is sent to the client, bearing only the .asp extention in
name.

A server.transfer just transfes the asp-code executuin to another
page, and the rendering of the htmp goes on, while the client
apparent name still is the name of the first page.

This is nearly the same as a serverside include, exept that the
include is done before the asp-engine starts executing the asp code,
and with server.transfer that execution has already started.

Server.execute acts nearly the same as server.transfer, exept that
the code goes on on the original "calling" page after the executed
page ends.

This in not the spec, but the way I "feel" about these command
statements.

For specs see the NG Faq or MDSN, I think


[please don't toppost on usenet. It is against netiquette.
Topposting corrected]
...So, I can't use Server.Transfer like I would Response.Redirect,
will the ASP script engine throw a fit if I attempt to tack on a
QueryString in the transfer? I understand wot ur saying when u say
there like server-side includes, and that u can't tack on a
QueryString there either, as its simply an include and not a redirect!


I don't think you understand, a redirect is a header command sent to the
client browser to call another page.
So Server.Transfer will act in the same way !?


Please reread my explanation, and try it out on your own system.
Where are all those MS MCP's when you need them !?


Aren't you acting like this is a paid helpline?

If you want to send data serverside from one page to another, use sesion
variables.

If you want to send serverside data to an include, the vbscript or
jscript variable will be valid.

Try it out!!
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #5
=?Utf-8?B?U3RlcGhlbk1jQw==?= wrote on 23 mei 2005 in
microsoft.public.inetserver.asp.general:
Your acting like you know the answer, but you don't, so I suggest if you
don't know then don't reply! You just end up wasting peopleƒ Ts time!


Dear StephenMcC,

If you feel I am "acting like" something does not bother me. I try to help
you, and since I am not on your payrol, the way I answer is my
prerogerative.

Your answer telling me that I should not respond on what you claim you
"know" already and that I only should answer on your OQ again proves to me
that you mistake usenet for a paid helpdesk.

I try to make my point that one is mistaken in the basic concepts of
servertransfer, if you think one can add a querystring, making my point not
only to you, because this is not email, but to the NG in general too.

However you are free not to read my postings.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #6
StephenMcC wrote:
Can I add a QueryString when doing a redirect using
server.transfer
No, because (a) it is not a redirect, and (b) the request already *has* a
querystring.
As I mentioned in my origianl post i'm already using
session variables, but I now want to attempt to share
this session between two sites.


This can be done, but not with Server.Transfer.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
5
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected...
2
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
3
by: Calvin KD | last post by:
Hi everyone, I don't know if there's anyone out there is having the same problem. My DotNet 1.1 version uses FormsAuthentication.RedirectFromLoginPage() method to take user from the Login page to...
4
by: Terry Olsen | last post by:
Since both methods seem to produce the same results, in which cases would you prefer one over the other? The only thing I would think is using Server.Transfer because of some browsers blocking...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
1
by: Henry | last post by:
Hello I'm using server.transfer() to navigate between pages, and I don't understand why the URL changes while navigating. My start page is default.aspx and from a button I want to navigate to...
2
by: Mike Placentra II | last post by:
Hi. When using Server.Transfer() to switch the request to a specific web form (as opposed to a class implementing IHttpHandler, if it makes any difference), do I have to do something special to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.