Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Server.Transfer method...

Reply
Thread Tools

Server.Transfer method...

 
 
StephenMcC
Guest
Posts: n/a
 
      05-20-2005
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.
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      05-20-2005
=?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)

 
Reply With Quote
 
 
 
 
StephenMcC
Guest
Posts: n/a
 
      05-20-2005
....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)
>
>

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      05-21-2005
=?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)

 
Reply With Quote
 
StephenMcC
Guest
Posts: n/a
 
      05-23-2005
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)
>
>

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      05-23-2005
=?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)

 
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




Advertisments