Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   About Response.Redirect (http://www.velocityreviews.com/forums/t798039-about-response-redirect.html)

qq 02-24-2005 05:35 PM

About Response.Redirect
 
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


McKirahan 02-24-2005 06:13 PM

Re: About Response.Redirect
 
"qq" <qq@discussions.microsoft.com> wrote in message
news:07214434-E86B-4DAF-A6A9-0D844A69AEE6@microsoft.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.



qq 02-24-2005 06:45 PM

Re: About Response.Redirect
 
Do you know how to correct my program? Thanks.


"McKirahan" wrote:

> "qq" <qq@discussions.microsoft.com> wrote in message
> news:07214434-E86B-4DAF-A6A9-0D844A69AEE6@microsoft.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.
>
>
>


Roland Hall 02-24-2005 08:10 PM

Re: About Response.Redirect
 
"McKirahan" <News@McKirahan.com> wrote in message
news:gcCdnWK04bB7hYPfRVn-iQ@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



Roland Hall 02-24-2005 08:19 PM

Re: About Response.Redirect
 
"Roland Hall" wrote in message news:O5nfazqGFHA.3472@TK2MSFTNGP09.phx.gbl...
: "McKirahan" wrote in message
: news:gcCdnWK04bB7hYPfRVn-iQ@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



Roland Hall 02-24-2005 08:40 PM

Re: About Response.Redirect
 
"Roland Hall" <nobody@nowhere> wrote in message
news:%23idlz4qGFHA.2900@TK2MSFTNGP10.phx.gbl...
: "Roland Hall" wrote in message
news:O5nfazqGFHA.3472@TK2MSFTNGP09.phx.gbl...
:: "McKirahan" wrote in message
:: news:gcCdnWK04bB7hYPfRVn-iQ@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



qq 02-25-2005 06:19 PM

Re: About Response.Redirect
 
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:password$#*@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:%23idlz4qGFHA.2900@TK2MSFTNGP10.phx.gbl...
> : "Roland Hall" wrote in message
> news:O5nfazqGFHA.3472@TK2MSFTNGP09.phx.gbl...
> :: "McKirahan" wrote in message
> :: news:gcCdnWK04bB7hYPfRVn-iQ@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
>
>
>


Roland Hall 02-26-2005 07:26 AM

Re: About Response.Redirect
 
"qq" wrote in message
news:CD5403F3-B45C-43C3-A1DE-B6A92BC5DB7C@microsoft.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:password$#*@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://username@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:$password@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




All times are GMT. The time now is 03:59 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57