简体   繁体   English

在Visual Studio 2012中通过FTP访问网站

[英]Accessing Website by FTP in visual studio 2012

I try to connect my website via ftp. 我尝试通过ftp连接我的网站。 I succeed connect the folders by my browser, but in visual studio 2012 I can connect the site just by the local address(10.100.101.100)and not by the remote address. 我成功通过浏览器连接了文件夹,但是在Visual Studio 2012中,我只能通过本地地址(10.100.101.100)而不是远程地址来连接站点。 I get this error when I try to connect in remote address: 当我尝试连接远程地址时出现此错误:

unable to retrieve folder information from the server. 无法从服务器检索文件夹信息。 can't connect to '(the remote ip address)' on port 21. Check the server name and proxy settings. 无法连接到端口21上的“(远程IP地址)”。检查服务器名称和代理设置。 If the settengs are correct, the server may be temporarily unavailable. 如果设置正确,则服务器可能暂时不可用。

This question is six years old, but still someone might benefit from it. 这个问题已有六年历史了,但是仍然有人可以从中受益。 Once you open visual studio, in the start page, go to Open Website. 打开Visual Studio后,请在开始页面中转到“打开网站”。

Then in the resulting dialog box select FTP Site. 然后在出现的对话框中,选择“ FTP站点”。

In the fields, for "server" give the ip address of your website and not the name. 在“服务器”字段中,输入您网站的IP地址而不是名称。 for "Port", give 21. For the "directory", use the ip address and slash like this: "165.63.29.89/". 对于“端口”,请输入21。对于“目录”,请使用IP地址并使用斜杠,例如:“ 165.63.29.89/”。 And then use your username and password. 然后使用您的用户名和密码。 You will have your website open and files listed. 您将打开您的网站并列出文件。

Edit1 :If it doesn't work, do the same thing but use only "/" for the directory. Edit1 :如果不起作用,请执行相同的操作,但仅对目录使用“ /”。 It will work. 它会工作。

Edit2: If the connection is still not established, do the same thing with "Passive mode" selected. Edit2:如果仍未建立连接,请在选择“被动模式”的情况下执行相同的操作。

And check the Microsoft Documentation here 并在此处查看Microsoft文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM