-1

I have two computers A and B connected in a same LAN. A is used as a server, it has IIS installed and some files in WWWROOT\Q1\. From B, I can use browser to browse the IIS files in A. I want to make a client to run in B, which can browse file the A's IIS's file, instead of use the browser handy. I don't know where to start and is it possible

Shortly, I want to browse files and directory in a remote IIS server enter image description here

Andiana
  • 1,912
  • 5
  • 37
  • 73
  • Not clear what you want. Do you want to know how to change your client to get HTML without embedding Internet Explorer, or are you asking how to server HTML files from a machine without using IIS? – Peter Morris Jun 16 '16 at 12:20
  • I want to get the list of all files and directories of an IIS server, which locate in another computer – Andiana Jun 16 '16 at 14:50
  • Is this some kind of trojan you are writing? – Peter Morris Jun 16 '16 at 17:03
  • @PeterMorris: Nope, I just want to get files and directories list from another computer's IIS ( in my network), I want to testing download/upload to IIS in another computer. – Andiana Jun 17 '16 at 01:08

1 Answers1

0

Use HtmlAgilityPack to both download the document and parse it

var doc = new HtmlDocument();
doc.Load("http://localhost/q1");
var linkNodes = htmlDoc.DocumentNode.SelectNodes("//a");

Refine the xpath in that query to make sure you only select file links, and then use other to select only directory links and call this routine recursively to collect files / folders within those folders.

Peter Morris
  • 20,174
  • 9
  • 81
  • 146