473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C#.NET reading remote host directory contents

Hi all,

I am trying to create a webpage that reads in the name of a host from
the user and then attempts to read the contents of this host, in order
to search for a particular type of file.
So once i have the hostname, something like:

1. Attempt to access <host>\share\dir
2. If success, read thru directory listing looking for certain
filetypes.
3. If found, process these files. Then output something back to user.

The problem i have is step 1... anyone know if it's possible to get
that done in a nice way, and have a directory structure to look thru?
The hosts in question are all on a LAN, with user ids,passwords,shares
setup so that i know them in advance.

Thanks.

Feb 17 '06 #1
1 2808
Hi,

To access a share on a LAN, your web application should have valid
rights to access the folder.

By defaul web application runs under ASPNET account.
Impersonate your web application with valid NT credentials in the
web.config file.

Cheers,
Kris

Feb 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Johann Blake | last post by:
I am using the TcpClient to connect to a web site. I then open a NetworkStream and read the contents that are being sent back. The problem is that I have no idea when the remote host is finished...
0
by: Nuno Magalhaes | last post by:
Hello all, I'm capturing the screen to a file (C:\output.wmv) as video source but now I have a big problem: How can I get the output sent to a remote host instead of a file? And, by the way, how...
2
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. ...
9
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
4
by: cpptutor2000 | last post by:
Could some C guru help me please? I am using the following program to open a SSH connection to a remote host and eventually run a program on that remote host. #include <stdio.h> #include...
3
by: dave_nul | last post by:
Hello. I'm trying to read the contents of any Web page on another host. I'm finding that... echo file_get_contents( 'http://www.php.net' ); .... works fine if I upload the PHP script to my...
3
by: alex | last post by:
Hello, My script is trying to get a file from a remote server, every day it ftps from a directory. My code works perfect if I know the name of the file in the remote directory. ...
1
by: malooga | last post by:
Hello, I'm having a problem connecting to DB2 on a remote iSeries host from a Linux server, both of which reside on my company's internal network. I'm using the IBM Linux Client V9.1. When I try...
6
by: Jason | last post by:
I would like to build a windows app or service that would read a .txt file and than put the contents of that file in an email and send off the email. WOuld that be very difficult?...how could this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.