Server.Transfer

M

Moheb Missaghi

Hi,

I am getting the following error when using
Server.Transfer:

System.ArgumentException: Invalid path for child
request 'https://....'. A virtual path is expected

I am using Server.Transfer("https://...", true). The path
in question is a valid url on the internet. Any idea?

Thanks,

Moheb
 
S

S. Justin Gengo

Moheb,

Server.Transfer requires a virtual path. Meaning that you can't specify http
or https in front of the path given.

You need to specify the path like: "mynextpage.apsx" or
"/admin/myadminpage.aspx"

If you need to Server.Transfer through a site using https you'll have to
enter a page with a response.redirect(https://myentrypage.aspx) and then
server.transfer from there to retain the https.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
G

Guest

Justin,

I can use Redirect instead of Transfer (there is no need
for an extra page). What I am trying to do is to send the
contents of the Form collection (hence the second arg is
set to true). This has worked before, I don't know what
the problem is now.

Thanks,

Moheb
-----Original Message-----
Moheb,

Server.Transfer requires a virtual path. Meaning that you can't specify http
or https in front of the path given.

You need to specify the path like: "mynextpage.apsx" or
"/admin/myadminpage.aspx"

If you need to Server.Transfer through a site using https you'll have to
enter a page with a response.redirect
(https://myentrypage.aspx) and then
 
S

shiv

Moheb,

What Justin says is true. it cannot work if you specify
http or http thats because, transfer works within the
worker process and thus it can transfer the form
collection to the next page without having to use
querystring or things like that. if in case if you are
allowed to use http, then you might want to use any URL
which may not belong to the same server.

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,588
Members
45,094
Latest member
PollyBlau4

Latest Threads

Top