从网站获取文件名 [英] Getting file names from a web site

查看:107
本文介绍了从网站获取文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2005 C#.NET 2.0编写Windows应用程序,并且需要从网站子文件夹中获取文件名列表(以便检查是否有要下载的更新的数据库文件).任何人都可以给我一种简单的方法,因为我没有任何与网络相关的编程经验.如果可以提供诸如"Databasexxxx.mdb"之类的搜索模式,这将很有用.非常感谢任何能够提供帮助的人.

I am writing a Windows application using VS2005 C# .NET 2.0 and I need to get a list of file names from a web site sub folder (in order to check if there is an updated database file to download). Can anyone give me a SIMPLE method as I have no experience of any web related programming. It would be useful if I could provide a search pattern such as "Databasexxxx.mdb". Many thanks to anyone who can help.

推荐答案

您的应用程序将在哪里运行?您是否正在尝试从远程位置访问网站虚拟文件夹?您具有对计算机/目录的访问特权吗?

我不确定您要执行的操作,但是如果没有正确的凭据,就无法从远程计算机访问虚拟目录.

另一种方法是从Web应用程序自身列出/导出所有文件

请参见此处
where is your application going to run? are you trying to access web sites virtual folder from a remote location? do you have an access privilege to the machine/directory?

I am not sure what you trying to do, but you can not access virtual directory from remote machine with out proper credentials to the machine.

another way is to list/export all the files from the web application it self

see here and here and here


这篇关于从网站获取文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆