Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




Issue With Response.Redirect / Server.Transfer


I have a problem with getting a redirect to work on our server.

It's worked fine on our server for months, but suddenly won't work and I
can't figure out why.

codewise, It's nothing special:

Response.Redirect("indexThankYou.htm");

instead of redirecting the browser to this page, an JavaScript-alert-style
message comes up with the text:

Cannot Find 'file://E:wwwrootmdc00152-learnproengine2_00index.htm'. Make
sure the path or Internet address is correct.

(No page exists, nor was there ever any mention of it in the code)

I've examined the output with fiddler to find:

<html><head><title>Object moved</title></head><body> <h2>Object moved to <a
href='E:wwwrootmdc00152-learnProEnginev2_00index.htm'>here</a>.</h2></body></html>

I've checked that the aspnet client folder, and it's there and loads with a
code 200 (from fiddler)

Has anyone any ideas why this might have suddenly stopped working? Does
this sound like a cache-ing problem? The code has worked fine previously.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Server.transfer Vs. Response.redirect
ok here is my scenario - using model, vew , controller architecture:

-- user submits the view page to the controller

-- controller issues a server.execute on a model page to update the changed information

-- upon successful updating of the the information, the controller issues server.transfer back to the view

-- everything is fine at at this point, however, if the user hits the
re-submits the page at this point, the original items are still in the
request object from the first time around because the page never went out of
scope - so this causes another update to be inssued because changes are
detected between what is in the database and what is in the request.form
collection.

Difference Between Response.redirect And Server.transfer
I have some ASP questions which I wanted answering (have an interview comming up)

1) What is the difference between response.redirect and server.transfer

2) How can you deal with recodset paging using ASP?

3) What are the different locking type and cursors in ASP?

Response.redirect & Server.transfer Very Slow
On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect and server.transfer take about a minute. But on my WinNT machine with IE5.5, it works instantly. What's going on?

Server.Transfer Vs. Response.Redirect... To... 209.11.22.33MyDir
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors?

1. Client-side VBscript code: call navigate("209.11.22.33MyDir")
2. Client-side VBscript code: location.href ="209.11.22.33MyDir"
3. Typing "209.11.22.33MyDir" into my ie6 browser.
4. Typing "209.11.22.33MyDir" into my Windows Explorer.

5. Server-side ASP: server.transfer "209.11.22.33MyDir"
6. Server-side ASP: response.redirect 209.11.22.33MyDir"

How do I make it redirect?

Server.Transfer, Response.Redirect, #Include, & Security?
I've got an application that I want to redirect to another file while keeping the location of the file hidden. In other words,

WEBROOT.COM/REDIT.ASP?a=14

is going to display the contents of file
WEBROOT.COM/SECURE12954

without the user knowing they are in the /SECURE12954 subdir.

Which is better to protect that privacy the name of the /SECURE12954 subdir?

<%Server.Transfer("/SECURE12954")%>
or
<%Response.Redirect("/SECURE12954")%>
or
<!-- #include file="/SECURE12954" -->

Server.execute/response.redirect/server.transfer
Real quick, please refresh my memory which one of the following preserves the information that was posted from a form?

server.execute

server.transfer

response.redirect

I need to have a page execute if an error occurs while processing a page that a form was submitted to and have the data preserved.

Response.Redirect Issue
All I want to do is use a simple redirect to bring the user to a different page but for some reason it will not work. I have checked the syntax a million times, checked with books and it is 100% correct but it will still not redirect me. Here is my code:

if Request.Form("Clear") = "Clear" then
Response.Write("<h1>CLEAR</h1>")
Response.Redirect(Request.ServerVariables"HTTP_REFERER"))
end if

I have the Response.Write in there just to see if my 'if' statement is true and it is. It writes but it will not redirect me at all. I even had a check on the path to see if it was outputting properly and it was.

006~ASP 0230~Server.Transfer Error~The Call To Server.Transfer Failed While Load
Any idea what is causing this error? 006~ASP
0230~Server.Transfer Error~The call to Server.Transfer
failed while loading the page.

Just read about benefits of Server.Transfer over
Response.Redirect, replaced, and getting the error.

Redirect To Secure FTP Site Via Response.redirect
I am trying to use the following in an ASP page to redirect a user to a
non-anonymous FTP site:

response.redirect("ftp://myusername:mypassword@ftp.mysite.com")

but I keep getting a "permission denied" error. If I just put the same
address string in IE6's Address box and go to it, IE opens myusername's FTP
home page just fine, so I know the FTP site is working as expected. Also,
if I put in an anonymous ftp site, without the username and password (e.g.
"ftp://ftp.microsoft.com"), the redirect works fine, too.

I don't want the user to be prompted by IE for the username and password at
the FTP site, so I am providing them from within the web site.

What can be preventing the response.redirect from handling non-anonymous FTP
access? Is there a better way to do this?

Asp Eof Response Write Issue
I am creating a page that will take date passed from a session then it does a query to the SQL to see if a matching record can be found (based on the date). If it is found it will return the record... No big deal here... But I am getting messed up because I have always used a redirect if a an EOF happened...

Because of the way the asp page works I need at EOF message to show on the SAME page as the record set would if it were to exisit... Code:

301 Redirect And URL Rewriting Issue
I'm using an open source .NET URL rewriter to handing 301 permanent redirect and url rewriting on my site. We want to use the url rewrite to clean up our urls for SEO purposes, and we want to use the 301 redirect because we are changing up the directory structure for the URL paths. With the URL rewriter, we can use regular expressions in the web.config for both the redirecting and rewriting.

Well, our current naming convention makes it impossible to use a regular expression for the redirect. It's an apartment site, and for the ratings pages the url paths looks like this: Code:

Error Server.Transfer / Server.Execute ()
Any one has Idea, How to use Server.Transfer and Server.Execute, When I tried to use these methods I got an eror:

Server object error 'ASP 0230 : 80004005'
Server.Transfer Error
/SISWeb/portal_logon.asp, line 40
The call to Server.Transfer failed while loading the page.

anybody is there who can respond to this problem. Do I need to change any setting at IIS?

Issue With Redirect Script In FireFox
I am having an issue using the 'Response.Redirect' command in FireFox.

I have an ASP page called dltrack.asp that, in order to track how many times certain MP3s are downloaded on our website, opens and updates a tally in a database, then redirects to the location of the MP3 on our server for the user to download the track. The redirect script i am using is:

Response.ContentType = "application/x-zip-compressed"
Response.Redirect (url)

Where the url is the location of the MP3 to be downloaded. When a user right clicks 'Save Target As' in Internet Explorer this works fine, but in FireFox when a user right clicks and selects 'Save Link As' FireFox downloads the MP3 but it is named 'dltrack.asp' instead of the filename of the song with an mp3 extension. Code:

Response.Write And Window.open Issue
I have an asp and a page with two frames. (constant, main)
I would like to show the page on a different frame. (main)
Here is what I have:

I am working in C#


void MYSelectedChangeEventHandlerFunction(DropDownList DD)
{
try
{
string address = DD.SelectedItem.Value;
//Response.Redirect("address");
Response.Write(" <script> window.open(address,main); </script> ")
}
catch(Exception ex)
{
DD.Items.Add("Dir Errors Found!");
}

}

What AM I doing wrong? Is there a better way to out put the page to a different frame within the function.

Carriage Return And Response.Write Output Issue
I have a field in a SQL Server table named DetailedDescription that is
a varchar. If the user adds/edits a detailed description, they do so
in a MulltiLine TextBox control. Therefore, they are able to click
enter on their keyboard and have multiple carriage returns inside the
DetaildDescription. Code:

Server.Transfer
I would like to use Server.Transfer to redirect users to a given page,
while maintaining the state of form fields. This works fine on a single
server.
However, this will be deployed in a load balanced environment. I know
that Session variables and load balanced environments don't mix. Do I
have a cause for concern with Server.Transfer as well?

Server.Transfer To A DLL - Is There A Way?
The Transfer method allows you to transfer from inside one ASP page to another ASP page

Is there a similar thing - The Transfer method taht allows you to transfer from inside one ASP page to a DLL.

About Server.transfer
I m using ASP(not .net) ,I want to use server.transfer from a.asp to a.asp (the same page), but i want to remove all the querystring before transferring the page.........although response.redirect can do, it cannot fulfil some response.write b4 the redirection.

Server.transfer
I am using the following statement in my asp page , it doesnt work

server.Transfer(ftp://mymachine/dir1/data.zip)

[Server.Transfer()]
How would i embed the Server.Transfer() into the button onClick() event.
I did try this:Code:

<td><input type="button" name="edit" value="Edit" onClick="<%Server.Transfer("edit.asp")%>"/></td>
but this will display the edit.asp page without the need to click on the Edit button.

Transfer Files From One Web Server To Another Web Server
How can i transfer files from one web server to another web server. Is it possible?

Server.Transfer Vs. Server.Execute
i'm using a model, view, control architecture for a group of .asp pages.

i can't decide whether to use Server.Transfer or Server.Execute to pass posted data from my control to my model. are there security implications for using Server.Execute?

just wanting some advice on pros/cons to each of these since this is the first time i'm attempting to use these methods.

Server.Transfer Between 2 Different Web Apps
I have 2 seperate web applications A and B. During the execution of A, I want to do a Server.Transfer to a page in application B. This works fine if A has a reference to B, but without the reference, I get the following error:

Parser Error

Description:

An error occurred during the parsing of a resource
required to service this request. Please review the
following specific parse error details and modify your
source file appropriately.

Parser Error Message:

Could not load type 'B.WebForm1'.

Source Error:

Line 1: <%@ Page language="c#" Codebehind="B.aspx.cs"
AutoEventWireup="false" Inherits="B.WebForm1" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3: <HTML>

Source File: c:inetpubwwwrootBB.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

It seems to be looking for B.dll in the path for application A, and can't find it. Because of the specifics of this project I am unable to set a reference, or even include a <codeBase> element in the config file. Is there any way to force the runtime to look in the path of the target application instead of the launching app?

Server.transfer Url W/ Parameter Help
This works:

Server.Transfer("testimonials.asp")

This does not

Server.Transfer("testimonials.asp?somevar=yes")

IIS Logs And Server.transfer
I am thinking of creating a custom 404 page which does a server.transfer to a variety of different pages. My question is what shows up in the log, which the web statistics are based on?

1. The non existent page, which is requested?
2. The custom 404 page?
3. The page it gets transfered to?

Problem With Server.Transfer
I am trying to open a jpg file using server.transfer which is giving me this error

I have about 10 images out of which 7 are working and for three images i am getting an error message.

I have listed the error message

Active Server Pageserror 'ASP 0116'
Missing close of script delimiter
/rtp/trt.jpg, line 11
The Script block lacks the close of script tag (%>). error '8000d001'
/ttt.asp, line 7

Please send me a solution as i have been trying this from the last three days and could not find a solution.

Server.transfer Second Parameter
I read somewhere that server.transfer had a 2nd parameter so control and input values were 'passed' to the transferred to page, but it's giving me an error of wrong number of parameters. I have IIS5, is that the problem? or is it that it's an ASP page (not ASPX)

Server.Transfer Error
when i try to redirect a page using the server.transfer i get this error:

Active Server Pages error 'ASP 0116'

Missing close of script delimiter

/database/mydatabase.mdb, line 7832

The Script block lacks the close of script tag (%>). error '8000d001'

/admin/pages/DatabaseMan1Re.asp, line 15

Line 15 is:

Server.Transfer("/database/mydatabase.mdb")%>

Server.Transfer Into A Frame
I'm trying to pass 2 simple values (an integer and a string) from a start page (start.aspx) to an aspx contained within a frameset (say destpage.aspx).

I can server.transfer the values directly to destpage.aspx but I'm struggling to work out how pass the form values to destpage.aspx when it is contained in a frameset.

Is there an easier way? Is it possible to pass the values to an aspx that defines the frameset then pass to destpage.aspx?

Server.Transfer Question
If I redirect a page using Server.Transfer() will I get a HTTP_REFERER from the original page?

Server.Transfer Error
I user Server.Transfer "MyTest.asp" to redirect the ASP page and it went through successfully If I used

Server.Transfer "MyTest.asp?R=22

The system return "An invalid character was specifiied in the Path parameter for the MapPath method." error (It seems that system treat parameter string as body of path

This ASP works fine in Windows NT server, but it does not work on Windows 2003 server.

Server.Transfer Method...
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.

Response.redirect And Response.end
Is there any point in having response.end after response.redirect?

Response.Redirect
I have a Popup window where a user inputs soem data.

On successfully entering this data I redirect the user to
a page in the same popup indicating that the form has
submitted successfully.

I want to resize the page that I redirect the user to.

Is this possible in ASP?

Response.Redirect IE5
Can anyone tell me if Response.Redirect works with IE5?, for me its seems to be working with IE6 and Firefox, but seems ineffective with IE5.

I have also set Response.Buffer = True

Response.redirect
How to send more than one value using response redirect? For example i can send one like this:

response.Redirect "pregled.asp?ime=" & strUserName
but how to send two or more values? I tried:

response.Redirect("pregled.asp?ime=" & strUserName & " & prezime = " &
strUserLastName)but it didn't work.

Response.Redirect
How do I use Response.Redirect to point to an interal private box/site? Code:

Response.Redirect
IF Trim(Request.QueryString("v")) = "" THEN
Back = Replace(Request.ServerVariables("Http_REFERER"),"http://localhost/","")
ELSE
Back = Request.QueryString("v")
END IF

Response.Redirect(""&Response.write(Back)&"")

why i cannot Redirect to the page?

Response.redirect
is it possible to open a page in a new window with response.redirect, and if
so, what is the syntax.

Response.Redirect
Code:
if left(request.Form("phone_nu"),3) = "234" and len(request.Form("phone_nu")) < 11 then
response.Redirect("sms.asp?error="&(request.Form("phone_nu")))
end if

Response.redirect
is there a way to response.redirect what's already in the address bar then add on what you want for each link? I have a page that will sort but I dont want to type out all the links. cant I do something like

response.write((whats in the address bar)&sort=asc)

I know I could do this
Response.write(request.servervariables("URL"))
but that doesnt give me the stuff in the address bar

Response.redirect
What is the proper syntax for this response.redirect? I am using mulitple IDs that I need to pass??


<%Response.Redirect("uGallery3.asp?ID=" & commInsert__ID & GalleryID= rsImages__MMID) %>

Response.Redirect
I have a page, progress.asp?id=<%=rs("id")%>, all the insert function will be done to nextpage.asp. Then, on nextpage.asp, I will like to redirect back to progress.asp?id=<%=rs("id")%>, but I have problem with the id.

Response.redirect
I am using response.redirec to do the url redirection on my login page. The
login page is under http://myURL/test/dir1/login.aspx, when the user login
successfully, the login page redirects the user to the default.apsx page,
which is under http://myURL/test/dir1/default.aspx.
When I enter the IP address of myURL in the address bar, the redirection
works perfectly fine, but if I enter myURL (which is hostname) in the address
bar, the redirection in login page doesn't work anymore, the login page just
gets refreshed.

Response.Redirect
I have an application form which on confirmation of details, takes you back to the page from where the person chose which course they want to apply for. The process has been working fine when I had just basic html (just the form tags) but when I put it into my html template I'm getting an error message when it comes to the response.redirect "index.asp". The error is
Header Error
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

Response.redirect
response.redirect seems to urlencode a querystring thrown across at it..
is there a way to disable this function that anyone knows of?

ie..
response.redirect "http://www.blurb.com/default.asp?test=sweet+%26+sour"

actually comes back after the redirect with the % urlencoded which obviously
considering its been given the encoding anyway is a nightmare.. ie
"http://www.blurb.com/default.asp?test=sweet+%2526+sour"

and subsequent redirections would just keep replacing the starting % with
%25...

tell meif it can be disabled through IIS somehow

Response.Redirect
IF rsQuery("survey_taken") = "Y" Then
%>
<script language = "Javascript">
alert ("You have taken the survey.");
</script>
<%
Response.Redirect "page.asp"
Else
End IF

Is the codes wrong? becos after the msg box pop up, it doesnt redirect me to the page.asp

Response.redirect
Response.redirect(results.Fields("Url"))

but still give me file not found 404 and i print the content in database to ensure it contain the exactly file and when write the file name as string it is worked
response.redirect("HoCom.htm")

Response.redirect
response.redirect "activemovieframe?movie=" & movie & """

the error is :

Code:

Microsoft VBScript compilation error '800a0409'

Unterminated string constant


Copyright © 2005-08 www.BigResource.com, All rights reserved