![]() |
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 |
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. |
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. > > > |
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 |
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 |
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 |
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 > > > |
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.