473,402 Members | 2,064 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,402 software developers and data experts.

About Response.Redirect

qq
Hi,

Does anyone know about Response.Redirect? I want user to login to our FTP
server via an asp page on my website with their username and password. I have
created a form with username and password in a .html. User input their
username and password from the page. And I created a .asp file as follows to
redirect our FTP Server.

<%@ LANGUAGE = "VBScript" %>
<% Option Explicit %>
<% Dim username
username = Request.Form("username") %>
<% Dim password
password = Request.Form("password") %>
<% Dim URL
URL = "ftp://" & username & ":" & password & "@ftp.mysite.com"
Response.Redirect URL
%>

It doesn’t work. But it is working when I change to URL =
http://www.mysite.com”.

Can anybody help out the issue? Thanks a lot.

--Qing

Jul 22 '05 #1
7 3073
"qq" <qq@discussions.microsoft.com> wrote in message
news:07**********************************@microsof t.com...
Hi,

Does anyone know about Response.Redirect? I want user to login to our FTP
server via an asp page on my website with their username and password. I have created a form with username and password in a .html. User input their
username and password from the page. And I created a .asp file as follows to redirect our FTP Server.

<%@ LANGUAGE = "VBScript" %>
<% Option Explicit %>
<% Dim username
username = Request.Form("username") %>
<% Dim password
password = Request.Form("password") %>
<% Dim URL
URL = "ftp://" & username & ":" & password & "@ftp.mysite.com"
Response.Redirect URL
%>

It doesn't work. But it is working when I change to URL =
"http://www.mysite.com".

Can anybody help out the issue? Thanks a lot.

--Qing


That URL format is disallowed with WinXP SP2.
Jul 22 '05 #2
qq
Do you know how to correct my program? Thanks.
"McKirahan" wrote:
"qq" <qq@discussions.microsoft.com> wrote in message
news:07**********************************@microsof t.com...
Hi,

Does anyone know about Response.Redirect? I want user to login to our FTP
server via an asp page on my website with their username and password. I

have
created a form with username and password in a .html. User input their
username and password from the page. And I created a .asp file as follows

to
redirect our FTP Server.

<%@ LANGUAGE = "VBScript" %>
<% Option Explicit %>
<% Dim username
username = Request.Form("username") %>
<% Dim password
password = Request.Form("password") %>
<% Dim URL
URL = "ftp://" & username & ":" & password & "@ftp.mysite.com"
Response.Redirect URL
%>

It doesn't work. But it is working when I change to URL =
"http://www.mysite.com".

Can anybody help out the issue? Thanks a lot.

--Qing


That URL format is disallowed with WinXP SP2.

Jul 22 '05 #3
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:gc********************@comcast.com...
:
: That URL format is disallowed with WinXP SP2.

I thought that was only for HTTP, not FTP?!

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #4
"Roland Hall" wrote in message news:O5**************@TK2MSFTNGP09.phx.gbl...
: "McKirahan" wrote in message
: news:gc********************@comcast.com...
::
:: That URL format is disallowed with WinXP SP2.
:
: I thought that was only for HTTP, not FTP?!

Make that HTTP(S). Wonder if this is still viable?!
http://www.eggheadcafe.com/PrintSear...asp?LINKID=594

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #5
"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
: "Roland Hall" wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
:: "McKirahan" wrote in message
:: news:gc********************@comcast.com...
:::
::: That URL format is disallowed with WinXP SP2.
::
:: I thought that was only for HTTP, not FTP?!
:
: Make that HTTP(S). Wonder if this is still viable?!
: http://www.eggheadcafe.com/PrintSear...asp?LINKID=594

Additional:
http://support.microsoft.com/default...b;en-us;834489
http://www.experts-exchange.com/Web/Q_21150155.html

While any connections not over an SSL or through a tunnel can be sniffed,
username:password doesn't make it any less secure but if log files recorded
it, then that would.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #6
qq
Hi, Roland,

Thank you for your help. Because Response.Redirect is just only for HTTP, So
I use the follows code.

<% Dim username
username = Request.Form("username") %>
<% Dim password
password = CStr(Request.Form("password")) %>
<% Dim URL
URL = "ftp://" & username & ":" & password & "@ftp.mysite.com"
%>

<html>

<script language="vbscript">

sub winopen(surl)
sfeature="toolbar=yes,location=yes,directories=yes ,status=yes,menubar=yes,scrollbars=yes,resizable=y es,width=680,height=500"
window.open surl,null,sfeature
'any other things
end sub

</script>

<body onload=winopen("<%= URL %>")>

</body>
</html>

My problem is:

<body onload=winopen(“ftp://ftp.mysite.com”)> works, I can got my ftp
server, a login screen come up.

But <body onload=winopen(“ftp://test:pa*********@ftp.mysite.com”)> doesn’t
working. And give me a error message:
Cannot find ‘ftp://test:password$/’. Make sure the path or Internet address
is correct.

Could you give me some idea to figure out it? Or do you have any another way
to solve my problem? Thanks a lot.

--Qing

"Roland Hall" wrote:
"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
: "Roland Hall" wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
:: "McKirahan" wrote in message
:: news:gc********************@comcast.com...
:::
::: That URL format is disallowed with WinXP SP2.
::
:: I thought that was only for HTTP, not FTP?!
:
: Make that HTTP(S). Wonder if this is still viable?!
: http://www.eggheadcafe.com/PrintSear...asp?LINKID=594

Additional:
http://support.microsoft.com/default...b;en-us;834489
http://www.experts-exchange.com/Web/Q_21150155.html

While any connections not over an SSL or through a tunnel can be sniffed,
username:password doesn't make it any less secure but if log files recorded
it, then that would.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Jul 22 '05 #7
"qq" wrote in message
news:CD**********************************@microsof t.com...
: Thank you for your help. Because Response.Redirect is just only for HTTP,
So
: I use the follows code.
:
: <% Dim username
: username = Request.Form("username") %>
: <% Dim password
: password = CStr(Request.Form("password")) %>
: <% Dim URL
: URL = "ftp://" & username & ":" & password & "@ftp.mysite.com"
: %>
:
: <html>
:
: <script language="vbscript">
:
: sub winopen(surl)
:
sfeature="toolbar=yes,location=yes,directories=yes ,status=yes,menubar=yes,scrollbars=yes,resizable=y es,width=680,height=500"
: window.open surl,null,sfeature
: 'any other things
: end sub
:
: </script>
:
: <body onload=winopen("<%= URL %>")>
:
: </body>
: </html>
:
: My problem is:
:
: <body onload=winopen("ftp://ftp.mysite.com")> works, I can got my ftp
: server, a login screen come up.
:
: But <body onload=winopen("ftp://test:pa*********@ftp.mysite.com")> doesn't
: working. And give me a error message:
: Cannot find 'ftp://test:password$/'. Make sure the path or Internet
address
: is correct.
:
: Could you give me some idea to figure out it? Or do you have any another
way
: to solve my problem? Thanks a lot.

I'm not sure why you need to open a new window with location.href would work
just fine.
Two more things:
1. language= is deprecated. use type="text/vbscript" instead.
2. Client-side VBScript should not be used on the Internet. Use javascript
instead.

Ok, it works for me but your password may have to be URL or HTML encoded
because of the characters in your password. I get a prompt to enter my
password but after I tell it to save it and log in once, it works from then
on. This means you probably only need:
ftp://us******@ftp.mysite.com

I'm not a fan of putting my password in a URL, even if it is passed in clear
text if entered manually.
The best thing to do is use secure FTP, which MSFT's FTP server doesn't
support or use WebDav over SSL or through a VPN tunnel.

If you can use PHP, this will also work: (this file would have to be called
ftp.php or change the action="")
<?
if($action=="login"){
Header ("Location: ftp://$username:$p*******@ftp.mysite.com");
}
?>
<form action="ftp.php?action=login" method="post" enctype="text/plain">
<table><tr><td>
username: <INPUT NAME="username" TYPE="text" SIZE=20><BR>
password: <INPUT NAME="password" TYPE="password" SIZE=20><BR>
</td></tr>
<tr><td align=center>
<INPUT TYPE="submit" value="submit" style="color: #ffffff; background-color:
#000000">
</td></tr></table>
</FORM>

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #8

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

Similar topics

3
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. Response.Redirect...
4
by: JC | last post by:
Hi, I have a simple question regarding the Response.Redirect method. Does the server stop processing the ASP code as soon as it encounters the Redirect command? Or does it ever continue to...
4
by: TomT | last post by:
Hi.. I'm redirecting users to another page using: response.redirect("newpage.asp") this works... But I need to add a variable to the page specified.. IE: newpage.asp?id=JobID
2
by: What-a-Tool | last post by:
I've got a bit of experience coding in VB.Net and VBA, but as I don't have the software to debug an ASP web application, I'm having a bit of trouble figuring out exactly how my code is...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
3
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query string. 3. Redirect to some other page Here...
4
by: rodchar | last post by:
hey all, i have a plain aspx page (page1) with 1 textbox on it, i hardcode sample text in the textbox. i have 1 button and in the codebehind button click event i response.redirect to page2. i...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.