Hello all, how do I get a directory listing from a web server ?, I'm
playing around with reflection and "Click once" deployment and would
like to loop through a directory listing and use Assembly.LoadFrom(dllname)
many thanks 6 5698
Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this,
you have to use Server.MapPath to get hte physical path.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Pete Kane" <pj**********@uku.co.uk> wrote in message
news:oy*****************@newsfe6-win.ntli.net... Hello all, how do I get a directory listing from a web server ?, I'm playing around with reflection and "Click once" deployment and would like to loop through a directory listing and use Assembly.LoadFrom(dllname)
many thanks
Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this, you have to use Server.MapPath to get hte physical path.
Hello Ignacio, thanks for your reply, I take it Directory.GetFiles takes
a web addresss as a parameter ?
cheers
Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this, you have to use Server.MapPath to get hte physical path.
Just thought I would clarify the way I'm trying to retrieve this
directory listing, I'm not using Asp, my app is a Windows form app
which loads all needed assemblies from a remote web site, the way I do
it now is:
string f1 = "mydll1.dll";
string f2 = "mydll2.dll";
....
string url = @"http://mywebsite.com/Assemblies/";
Assembly.LoadFrom(url + f1)
....
etc...
which is horrible but it works, I would like to read all the files
directly and loop through them
thanks
Hi,
"Pete Kane" <pj**********@uku.co.uk> wrote in message
news:VT*****************@newsfe6-gui.ntli.net... Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this, you have to use Server.MapPath to get hte physical path.
Hello Ignacio, thanks for your reply, I take it Directory.GetFiles takes a web addresss as a parameter ?
Nop, it takes a local path , that's why you need MapPath for.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Pete Kane wrote: Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this, you have to use Server.MapPath to get hte physical path.
Just thought I would clarify the way I'm trying to retrieve this directory listing, I'm not using Asp, my app is a Windows form app which loads all needed assemblies from a remote web site, the way I do it now is:
string f1 = "mydll1.dll"; string f2 = "mydll2.dll"; ... string url = @"http://mywebsite.com/Assemblies/";
Assembly.LoadFrom(url + f1) ... etc... which is horrible but it works, I would like to read all the files directly and loop through them
Most (all?) production web servers disable the ability to browse a
directory content from a web client, for obvious security reasons, so
you're basically out of luck on this one. Can't you create and maintain
a known HTML page (or even plain text file) that contains the list of
your plugins?
Arnaud
MVP - VC ad******@club-internet.fr wrote: Pete Kane wrote:
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
You could use Directory.GetFiles . IIRC you cannot use reflection for this, you have to use Server.MapPath to get hte physical path.
Just thought I would clarify the way I'm trying to retrieve this directory listing, I'm not using Asp, my app is a Windows form app which loads all needed assemblies from a remote web site, the way I do it now is:
string f1 = "mydll1.dll"; string f2 = "mydll2.dll"; ... string url = @"http://mywebsite.com/Assemblies/";
Assembly.LoadFrom(url + f1) ... etc... which is horrible but it works, I would like to read all the files directly and loop through them
Most (all?) production web servers disable the ability to browse a directory content from a web client, for obvious security reasons, so you're basically out of luck on this one. Can't you create and maintain a known HTML page (or even plain text file) that contains the list of your plugins?
Arnaud MVP - VC
Looks like I'll have to go that route, thanks all, BTW is MapPath an asp
function ?
regards This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dan King |
last post by:
I have an ASP page that currently gives me an output of file listing with
links to each of them for the current directory.
The problem I am having is there are getting to be too many folders. I...
|
by: Dean |
last post by:
Hi
I've got a question relating to using Javascript on an Intranet. I
have a directory with a list of files in the format week36.xls,
week37.xls
and I want to write a script that will scan...
|
by: SU News Server |
last post by:
I've struggled with this for quite a while and I'm am just not sure
what is going on. I have the following code
import os
def buildList( directory='/Users/mkonrad' )
dirs =
listing =...
|
by: Michael C |
last post by:
....on a remote machine?
Thanks,
Michael C.
|
by: gil |
last post by:
Is it possible to prevent a browser from listing the entire contents of
a folder?
The site, is hosted on my ISP with the following layout-
site/ "user name from ISP"
pagefile (dir)...
| |
by: dougawells |
last post by:
Hi -
I'm hoping for help with the auto-generation of a hyperlinked listing
of all files in a directory. The server I use does not auto-generate
this. So, when someone comes to this directory and...
|
by: epikto |
last post by:
I have a mapped share that I am trying to get a listing of all the files that it contains.
I use the following code to access the contents
String files = Directory.GetFiles(path);
I can then...
|
by: marcusadeleon |
last post by:
Hi,
I was wondering how to open up a web directory to get a file listing.
The directory I want to open allows directory listings, but has a
directory password. Meaning it gives me a prompt to...
|
by: Steve |
last post by:
My site is hosted on a Godaddy reseller site. Godaddy only allows the
use of Curl to access remote sites.
What is the method for listing a directory after connecting to the
site with Curl?
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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 project—planning, coding, testing,...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |