Get Client system's directory/folder list using client script

hello to all,

I want to know that is there any way by which i could retrieve client's harddisk information at client side.i mean to ask is, I want create a web based FTP so i need client systems directory at one side.i can retrieve it using webservice or ActiveX control or normal server control.i am restricted to use of ActiveX controls and webservice internally make call to webserver,server control also do the same.

so i want to retrieve client information at client side only .

 

please update me.

Thanks

0
shikharjain2007
9/26/2008 9:59:53 AM
asp.net.client-side 24353 articles. 2 followers. Follow

15 Replies
1871 Views

Similar Articles

[PageSpeed] 0

Uhh, you want his Social Security Number and credit card number too? You can't do that as it is against browser security. Only an ActiveX object could help get around browser restrictions.

NC...

 

1
NC01
9/26/2008 4:51:03 PM

A server cannot get information about the client's hard drive.  Just like you can't get information about the server's hard drive (programmatically, that is).

And a web-based FTP application seems pointless to me, considering the vast majority of browsers already have an FTP implementation.

Best regards...


Josh Stodola ← Come check out my blog!
0
JoshStodola
9/26/2008 6:20:46 PM
no dear i dont want to have any information about client machine from server,rather i just need to form a directory tree of client machine drive and folder list at client side only so that i could perform ftp operation.server data i can get using web services.so instead to making call to server to read client directory I want to know is there  any client specific language like javascript which run at client side only using which i could accomplish my work.though activex control serves these purpose for me but i cant use them.
0
shikharjain2007
9/29/2008 4:29:45 AM

no dear i dont want to have any information about client machine from server,rather i just need to form a directory tree of client machine drive and folder list at client side
 
Isn't form a directory tree of client machine drive and folder list at client side getting information about client machine?

Again, you can NOT do that except through an ActiveX object that must be installed with the proper permissions on EVERY client, and will only work in Internet Explorer. See these links for tutorials on creating an ActiveX object:

http://www.codeproject.com/vbscript/vbActiveXControl.asp
http://www.dotnetjunkies.com/Article/84C30D12-174D-48EB-83FD-F6A6A1E08C44.dcik

NC...

0
NC01
9/29/2008 11:20:04 AM

You don't understand.  If this could be done with client script, it would be possible to pass the information to the server.  Just the fact that it is a possibility is too much of a security risk. 

Move on to your next problem - you will not be able to make this work.

Best regards...


Josh Stodola ← Come check out my blog!
0
JoshStodola
9/29/2008 12:19:45 PM
Hi shikharjain2007
 
We can use JavaScript and ActiveX (FSO) to get client system's directory/folder list. However, just as NC and Josh pointed out, we need every client machine grant the proper permissions. And the Scripting.FileSystemObject is only supported by Internet Explorer.
 
So, sadly to say, we can use JavaScript and ActiveX (FSO) to get client system's directory list, but that solution is unsuitable for your scenario.
 
Please check the following link to get more information:
 
Find files with JavaScript
 
http://www.codeproject.com/KB/scripting/search_in_files.aspx
 
 
One important thing to keep in mind when using the FileSystemObject is permissions! In Windows NT, there are three types of permissions: Read, Write, and Full Access. Whenever an ASP page attempts to execute some file system command using FSO, the anonymous web user ID is used: IUSR_machinename (i.e., if your webserver is named Bob, the user ID is IUSR_Bob). If IUSR_machinename doesn't have permissions to Read for a particular directory, you cannot use FSO to read the contents of a file in that directory through an ASP page. If IUSR_machinename doesn't have permissions to Write for a particular directory, you cannot use FSO to write a file to that directory through an ASP page. If IUSR_machinename doesn't have Full Access permissions for a particular directory, you cannot use FSO to delete or move a file from that directory through an ASP page.

 
If I’ve misunderstood the facing problem, please feel free to let me know.
 
Thanks.
 

 


Lance Zhang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Lance
9/30/2008 4:17:10 AM

Hello to all,

Thanks alot for your replies and guidence.

0
shikharjain2007
9/30/2008 4:58:45 AM

I was just following the thread here and the security aspects being discussed .... do these same issues not apply to the file upload control where you can browse a clients machine?  ... is there anyway of overriding this functionality for you own purposes?


Live the journey, for every destination is but a doorway to another.

(Old Eternian saying). M.A.A '87
0
predmo
2/17/2009 8:49:32 AM

predmo:

I was just following the thread here and the security aspects being discussed .... do these same issues not apply to the file upload control where you can browse a clients machine?  ... is there anyway of overriding this functionality for you own purposes?

YOU can't browse the client's machine, ONLY the file upload control can and gives you, as the developer, ONLY the file path chosen by the user himself. In fact, in the newer browsers, you, as the developer, cannot even view the file path. Only the filename.

NC...

0
NC01
2/17/2009 12:42:38 PM

HI NC ... you are right I dont want the code to be able to go off and navigate through a clients directory structure without their knowledge. I was wondering if there was a control (or if it were possible) to provide an interface similar to that of the fileupload that would allow the user to navigate throught the directories on their file system then allow them to select a folder or file and then have the path of that folder or file returned to the webserver ... can this be done?


Live the journey, for every destination is but a doorway to another.

(Old Eternian saying). M.A.A '87
0
predmo
2/17/2009 4:01:19 PM

predmo:

HI NC ... you are right I dont want the code to be able to go off and navigate through a clients directory structure without their knowledge. I was wondering if there was a control (or if it were possible) to provide an interface similar to that of the fileupload that would allow the user to navigate throught the directories on their file system then allow them to select a folder or file and then have the path of that folder or file returned to the webserver ... can this be done?

Of course not, which is what all of the other posts on this thread tell you. That is unless you install an ActiveX object on each user's computer, which will only work in IE and depends on the user to allow you to access.

NC...

 

0
NC01
2/17/2009 6:01:08 PM

This is probably a silly question but I dont understand how the fileupload control can allow the user to navigate through their directory structure (to pick a file to upload) for all types of browsers ... what is the technology that brings up that directory navigation window? .. it is not Active X  is it?.... how is it different to the "navigation control" I described in a previous posting which would require Active X? ... thanks and apologies if there is a really obvious answer to all this , I am just not seeing it!


Live the journey, for every destination is but a doorway to another.

(Old Eternian saying). M.A.A '87
0
predmo
2/17/2009 8:48:53 PM

Simple. The file upload control is built to allow the user to browse their machine and capture the user's selection. The only other option is ActiveX.

NC...

 

0
NC01
2/18/2009 12:00:59 PM

I think I have it ... the FileUpload control renders the following html to the browser 

input type="file"

this is part of the HTML specification and cannot be changed, it is interpreted by all browsers and implements the standard file upload functionality as specified in the HTML specs  (including the facility to browse driectories) ...


Live the journey, for every destination is but a doorway to another.

(Old Eternian saying). M.A.A '87
0
predmo
2/18/2009 2:27:05 PM

For more information on the design principles of file input

RFC1867 - Form-based File Upload in HTML

http://www.faqs.org/rfcs/rfc1867.html


Live the journey, for every destination is but a doorway to another.

(Old Eternian saying). M.A.A '87
0
predmo
2/18/2009 2:32:00 PM
Reply:

Similar Artilces:

How to write data to a file in client side using javascript or someother client side scripting language.
Hi, I would like to know how to write a data to a client side file using javascript or someother client side scripting language. The file type expected is ini file. txt file would also be appreciable. Thanks in advance.   If the site is a trusted and you are running IE then you could try http://www.w3schools.com/asp/asp_ref_filesystem.asp The Old Sewing FactoryThat twitter nonsense. You can write to the server, but not to the client's machine.  Being able to do so would be a huge security breach.When you ask a question, remember to click "mark as answered"...

Is it possible to redirect client's browser from the client side?
What I'm getting at is this. My server doesn't have access to certain websites. But my client's browsing my site will have access from the computers they're using. Can my programming logic somehow open up a restricted access site by routing the command to the client's browser and then out on to the web? Or is the best I can do simply putting a hyperlink up that the user can click on? Thanks for any help. To perform any action on the client you will need to consider using a client-side language such as Javascript. You would then be able to do something like document.location('url to re...

Invalid index error
Hi all. When I go to any of our users who use GW6.5 and click on the checklist folder I get error C00E which states the following fix: C00E Invalid index number Source: GroupWise engine; database services. Explanation: Invalid index number. Possible Cause: When converting a post office from 5.x to 6.x, the post office database (wphost.db) was missing in the post office. Action: Restore the wphost.db file to the post office. Although the conversion does not actually use the old wphost.db file, it does attempt to access a file by that name in order to rename it. ...

List of client side function of extenders and controls for client side
Hello All,I am using AJAX control toolkit for my current project. Now I need to find out what client side functions I can call on an extender. Lets say I am using a PopControlExtender. Now I want to show the popup from a JS funtions.If I can do a guess then it would be something like this$find('ppce').show();From where I can find what client side functions I can call on those extensders. This is really a frusterating thing. I learn about extenders only from Learn tutorials, no help here and there. Can anybody please tell me where are documentations about all the extenders in the tool...

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?
without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible? avdp211:without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible? I don't think it is possible.You use the the HTML input file control and when you post the request, on the web server you need to read the data and save it to a file, so there has to be some interaction with the server to handle the post request.  Not possible vi...

Junk mail folder shows up in client even though it's not enabled in Client Options?
Any idea why this happens sporadically? We never enabled junk email handling (so all the boxes are unchecked and grayed out except for the "Master" one which is: Enable Junk Mail handling) Yet, the stupid Junk mail folder sporadically shows up on the client. It was gone for months, then showed up, then went away, and now it's back again. Random users in all PO's. Only thing that changed was on the server end with all the patches from Novell for GroupWise (HP, HP1a, post HP1a Rev2 SP1b or whatever it's called) M, It appears that in the past...

How to use client-side script(javascript) in DNA using .Net Remoting
Hi all,     It was known that SAO and Singleton object about .Net Remoting. When I Create an object in server side and hosting in IIS's virtual directory,I want to use javascript asynchronous invoking the remote object by HTTP channel, 80 port and SOAP formatter just like XMLHTTP invoking web service. My code as following, <script> objXmlDoc = new ActiveXObject("Msxml2.DOMDocument"); objHttp = new ActiveXObject("Msxml2.XMLHTTP"); strEnvelope = ?? objHttp.onreadystatechange = function() { ...... }   szUrl = "http://ServerNa...

how do i get selectedValue of drop down list server side if i am populating it using client side javascript?
 Hi All.I am populating a drop down list client side using: The drop down list is populated based on a selection of another drop down list. ddlList.options[i] = new Option(1,2); as an exampleThe populating is done as i need it to. However, a button click event i am trying to get the selectedValue of the ddlList. However, it doesn't give me it. It only gives me the selectedValue of the drop down list on first rendering. Any ideas on how i can get it?   Could You paste some code? That would be helpful. Thanks S@ss (Shashi Shekhar Singh)My BlogPlease mark a post as ANSWER ...

Client User Name from the client's compurer?
How can I get the client user name using Active Directory?   Its a little tricky, but here is an article that may help you: http://www.codeproject.com/KB/system/activedirquery.aspxPlease mark as "answer" if this helped you in anyway....

Extracting the Client's 'Block List'
Is there a way to extract a user's 'Block List' from junk mail handling? Not currently Cheers Dave -- Dave Parkes [NSCS] Occasionally resident at http://support-forums.novell.com/ ...

getting datagrid's height client side?
hi alli've come across a bit of a snag... i need to find out the height of the datagrid client side as i'm utilizing cascading datagrids and need to dynamically change the height of the grids... i guess i'd need to utilize javascript for this, but i have no idea how to code js...anyone come across this before?thanks!:) put the datagrid in an HTML table and use the height of the table. greets,interwanderersee my blog at www.Interdevelopments.com and check the future of open mobile widget solutions at www.glowe.org...

How to get browser's name client side?
Is there any object/method that will give me information on the browser, client side? For example, I need to detect IE browser. I am using:  function st_IsIE() { if(navigator.appName.indexOf("Microsoft Internet Explorer") != -1) { return true; } return false; }   Is there a better way?   Hi, Check this, one of the best script i found for doing this - http://www.quirksmode.org/js/detect.htmlWhen you ask a question, remember to click "mark as answered" when you get a reply which answers your question; this ensures the right forum...

Using AJAX and client side scripting with .NET objects?
I'm wanting to use client-side scripting and AJAX with some drop down boxes.  I can't seem to do this with server-side .NET objects... changing the runat tag doesn't do anything either.  How can I expose .NET server objects so that they are affected by java script and AJAX? Depends on what, exactly, you're trying to do with them.  If you just need access to the html properties (e.g. selectedValue), then you simply grab them as if they were their html equivilants (select element) in javascript.  If you want to pass custom properties back and forth (or any .Net property ...

Client's Archive folder does not get created
We've freshly upgraded from GW6.5 to GW7sp1. The upgrade went well. A week later I turned on auto-archive, everything older than 7 day. The archive folder is expected to be created in their home directory, pointed to by P:. So, they archive to "P:\GWArchive". Then I locked it so the client cannot turn it off. For those who already have the archive folder created, archiving happens as planned. For those who don't, the archive folder never gets created. Here's what Ive done: 1) I've created the archive folder manually and archiving starts working: 2) f...

Web resources about - Get Client system's directory/folder list using client script - asp.net.client-side

Resources last updated: 12/8/2015 3:09:00 PM