Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. access other system drive on LAN in .net

access other system drive on LAN in .net

Scheduled Pinned Locked Moved C#
csharphelp
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 2 Offline
    2 Offline
    2208
    wrote on last edited by
    #1

    i want to place files from my system on other system by using .net source code i don't want share folder on other system i want to do this diagrammatically how is that possible please help me

    R D 2 Replies Last reply
    0
    • 2 2208

      i want to place files from my system on other system by using .net source code i don't want share folder on other system i want to do this diagrammatically how is that possible please help me

      R Offline
      R Offline
      Rajesh Anuhya
      wrote on last edited by
      #2

      it's simple.., see the below code..,

      FileStream Fs = new FileStream(@"\\192.168.1.12\watcher\" + FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);

      Rajesh B --> A Poor Workman Blames His Tools <--

      2 1 Reply Last reply
      0
      • 2 2208

        i want to place files from my system on other system by using .net source code i don't want share folder on other system i want to do this diagrammatically how is that possible please help me

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        First, if you don't want a share exposwed by the other machine, you'll have to use the administrative drive shares (if those haven't been removed!). That would mean you have to use the UNC path to teh machine in the form of \\_machineName_\**C$**\someFolder\someOtherFolder\filename.ext. The problem is that your code has to be running under account that is recognized by both your machine and the target machine NAD IS AN ADMIN LEVEL ACCOUNT ON THE TARGET MACHINE.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        2 1 Reply Last reply
        0
        • D Dave Kreskowiak

          First, if you don't want a share exposwed by the other machine, you'll have to use the administrative drive shares (if those haven't been removed!). That would mean you have to use the UNC path to teh machine in the form of \\_machineName_\**C$**\someFolder\someOtherFolder\filename.ext. The problem is that your code has to be running under account that is recognized by both your machine and the target machine NAD IS AN ADMIN LEVEL ACCOUNT ON THE TARGET MACHINE.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          2 Offline
          2 Offline
          2208
          wrote on last edited by
          #4

          \\machineName\C$\someFolder\someOtherFolder\filename.ext. if i will use this then other systems guest service creats problem is there any API or method to accessfiles on other sytem by providing administrator username and password for example Access(mashinename+filesPath, adminUserName, adminPassword) ??

          D 1 Reply Last reply
          0
          • 2 2208

            \\machineName\C$\someFolder\someOtherFolder\filename.ext. if i will use this then other systems guest service creats problem is there any API or method to accessfiles on other sytem by providing administrator username and password for example Access(mashinename+filesPath, adminUserName, adminPassword) ??

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Yep. Take a look at this[^].

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            2 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Yep. Take a look at this[^].

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              2 Offline
              2 Offline
              2208
              wrote on last edited by
              #6

              i can not use domain name system i want to do it in workgroup enviornment ????

              D 1 Reply Last reply
              0
              • R Rajesh Anuhya

                it's simple.., see the below code..,

                FileStream Fs = new FileStream(@"\\192.168.1.12\watcher\" + FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);

                Rajesh B --> A Poor Workman Blames His Tools <--

                2 Offline
                2 Offline
                2208
                wrote on last edited by
                #7

                actualy i want to update files on other system as when as i edit on my system ( mean place my files on other system) but i cannt share folder of other system and i am working in workgroup environment and is it possible using http protocol if yes then guid me plz

                modified on Saturday, October 17, 2009 1:17 AM

                1 Reply Last reply
                0
                • 2 2208

                  i can not use domain name system i want to do it in workgroup enviornment ????

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  That's the only method you have. The "domain" would be the name of the target workstation since the admin account your use must be on that workstation. That's IF the workstation is not part of a domain.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008
                  But no longer in 2009...

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups