locked
How to access client system local drives from server RRS feed

  • Question

  • Hello Everyone ,

                              I am creating a application in asp.net  which will access (show) server drives and client drives as well so user can copy  files from one location to another location so please can any one tell me that how can i get client local drives from server  

               Thanks in advance  

    • Moved by Kristin Xie Wednesday, September 17, 2014 8:33 AM
    Tuesday, September 16, 2014 11:25 AM

Answers

  • I don't think asp.net allows you to random access the clients harddrive. In the end of the day it is just a nice looking 1990 HTML Forumular - it can include files, but no random access.

    You need something like a service, console application, background process or win form on the client side. And it msut run under apropirate rights to access the files.
    Propably using the WinForms or WPF applciation is easiest as you need a effective overview over client and server side content.


    Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.

    • Proposed as answer by CoolDadTx Tuesday, September 16, 2014 2:37 PM
    • Marked as answer by Just Karl Tuesday, June 2, 2015 10:50 PM
    Tuesday, September 16, 2014 11:37 AM
  • side filesystem in ASP.NET directly.  It would be a huge security hole.  If it were possible a malicious site could scan your filesystem.  You can access the isolated storage for the client but that is a sandbox and not the actual filesystem. 

    The only "reasonable" time you can access the local filesystem is when allowing the user to select a file (such as for upload) but the server would never see the file system itself, just the file contents.  The only other approach I'm aware of is to host the FileSystemObject scripting object but this component has pretty much been disabled on browsers except in trusted situations because of the security hole issue.

    Please post further ASP.NET questions in the ASP.NET forums (http://forums.asp.net ).

    Michael Taylor
    http://blogs.msmvps.com/p3net

    • Proposed as answer by Just Karl Monday, September 29, 2014 10:57 PM
    • Marked as answer by Just Karl Tuesday, June 2, 2015 10:50 PM
    Tuesday, September 16, 2014 2:41 PM

All replies

  • I don't think asp.net allows you to random access the clients harddrive. In the end of the day it is just a nice looking 1990 HTML Forumular - it can include files, but no random access.

    You need something like a service, console application, background process or win form on the client side. And it msut run under apropirate rights to access the files.
    Propably using the WinForms or WPF applciation is easiest as you need a effective overview over client and server side content.


    Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.

    • Proposed as answer by CoolDadTx Tuesday, September 16, 2014 2:37 PM
    • Marked as answer by Just Karl Tuesday, June 2, 2015 10:50 PM
    Tuesday, September 16, 2014 11:37 AM
  • side filesystem in ASP.NET directly.  It would be a huge security hole.  If it were possible a malicious site could scan your filesystem.  You can access the isolated storage for the client but that is a sandbox and not the actual filesystem. 

    The only "reasonable" time you can access the local filesystem is when allowing the user to select a file (such as for upload) but the server would never see the file system itself, just the file contents.  The only other approach I'm aware of is to host the FileSystemObject scripting object but this component has pretty much been disabled on browsers except in trusted situations because of the security hole issue.

    Please post further ASP.NET questions in the ASP.NET forums (http://forums.asp.net ).

    Michael Taylor
    http://blogs.msmvps.com/p3net

    • Proposed as answer by Just Karl Monday, September 29, 2014 10:57 PM
    • Marked as answer by Just Karl Tuesday, June 2, 2015 10:50 PM
    Tuesday, September 16, 2014 2:41 PM