0

Now I am successfully using WebClient.DownloadString to get file content from ESX server. My URI is something like:
https://<ip>/folder/<file-path>?dcPath=ha-datacenter&dsName=<datastore-name>

But how can I get a content of a hidden file (e.g. '.myfile')?

UPDATE: I have the 404 or Not Found error message when I receive a response from the server. And nothing happens when I open this url in my browser. May be there is exist a parameter like 'dcPath' (datacenter path) or 'dsName' (datastore name) for ESX https request to receive a content of a hidden file. Or may be there are ESX server's settings that enable receiving hidden files through the https?

SKINDER
  • 950
  • 3
  • 17
  • 39
  • What does a hidded file has to do with a web request? I don't think the server hands out hidden files... Anyway, it's a shame you added a bounty when in fact you should have edited the question and add details... What happens when you open that url in your browser? Is the file being downloaded? And what exactly is the problem? – Kobi Aug 23 '10 at 08:02
  • What do you mean "nothing happens when I open this url in my browser"? Do you mean you got a 404 error? Have you checked the HTTP access log? – William Niu Aug 24 '10 at 23:14

2 Answers2

1

You would have to configure the webserver to display hidden files. There are a lot of file types not shown by default. Like temporarily editor files, userfiles that happens to be in the wrong directory etc. Most webservers only displays files ending in .html .htm .css etc. This is also the same filer that decides if files should be executed before show, like .jsp .cgi.

To read more about how this works on Apache (most common webserver) visit this page

UnixShadow
  • 1,222
  • 8
  • 12
1

Like @UnixShadow suggested you would need to set a mime-type for the file type/extension you are trying to access. But the real issue here is that static files that have the hidden attribute set will return a HTTP 404 or an Access Denied error when browsed.

Configuring access control for all Web files should always be implemented through NTFS permissions.

http://support.microsoft.com/kb/216803

Bruce Adams
  • 12,040
  • 6
  • 28
  • 37