access dir on other machine

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default access dir on other machine

    How to access directory on other machine in the network.
    If I use path of the server machine it works fine
    I want to access other machine that needs uname and pwd.

    I have tried
    1) Gave the right to act as part of OS TO ASPNET USER IN LOCAL
    SECURITY POLICIES

    2) <identity impersonate="true"
    userName="user12"
    password="pwddd12" />
    setting in the web.config

    This does not work and says :

    Could not create Windows user token from the credentials specified in
    the config file. Error from the operating system 'A required privilege
    is not held by the client. '


    my code:
    DownDirPath = "\\domain\folder_name\xyz"
    'DownDirPath = "C:\UPLOAD\voice"

    DownDirLength = DownDirPath.Length()
    DownMyDir = New DirectoryInfo(DownDirPath)

    'DownMyFileInfos = DownMyDir.GetFiles("*.*")
    DownTotalElements = DownMyFileInfos.Length()

    DownAllFilesName = Directory.GetFiles(DownDirPath, "*.*")
    A.V.C. Guest

  2. Similar Questions and Discussions

    1. access database on another machine
      hi guys! is posible to connect coldfusion mx with databases residing in another machine ? an access database is required to be on another...
    2. Can't access Web Service from ASP.NET app on diff machine
      Hi! I am developing web applications on an Intranet using Visual Studio.NET 2003 and .NET Framework v1.1, with IE 6 as the browser. Web servers...
    3. unable to access web page on development machine
      I am trying to run a simple asp.net page using Visual Studio Net Pro 2002 and getting an error 403.1 Forbidden: Execute Access Forbidden. It...
    4. Sql server update via asp with access db on remote machine
      Hello, can anyone give me some hints about updating a sql server database with MsAccess database info on a remote desktop machine, the idea is to...
    5. Can't access machine with alternate name assigned in WINS
      Hi, I have two computers (machine1 mapped to 10.0.0.10 and machine2 mapped to 10.0.0.20), in a domain with WINS. Both machines are on Windows XP...
  3. #2

    Default Re: access dir on other machine

    you have use use a domain user to access this drive, perhaps all you need to do is this

    <identity impersonate="true"
    userName="MYDOMAIN\user12"
    password="pwddd12" />

    also, I'd suggest removing "act as part of OS" on aspnet user immediately, that is a major security risk when you realize what it is doing. Usually this is suggested by ignorant people who don't know better, they just got it "working" because they enabled it. For your problem it won't work since you are accessing network resources, but you've managed to make your aspnet completely unsecure to every file on your webserver, as no NTFS file permissions can keep it controlling the filesystem.

    --Michael

    "A.V.C." <yhspl_softwaregroup@hotmail.com> wrote in message news:d28fa5d0.0408112306.6fcfb8db@posting.google.c om...
    > How to access directory on other machine in the network.
    > If I use path of the server machine it works fine
    > I want to access other machine that needs uname and pwd.
    >
    > I have tried
    > 1) Gave the right to act as part of OS TO ASPNET USER IN LOCAL
    > SECURITY POLICIES
    >
    > 2) <identity impersonate="true"
    > userName="user12"
    > password="pwddd12" />
    > setting in the web.config
    >
    > This does not work and says :
    >
    > Could not create Windows user token from the credentials specified in
    > the config file. Error from the operating system 'A required privilege
    > is not held by the client. '
    >
    >
    > my code:
    > DownDirPath = "\\domain\folder_name\xyz"
    > 'DownDirPath = "C:\UPLOAD\voice"
    >
    > DownDirLength = DownDirPath.Length()
    > DownMyDir = New DirectoryInfo(DownDirPath)
    >
    > 'DownMyFileInfos = DownMyDir.GetFiles("*.*")
    > DownTotalElements = DownMyFileInfos.Length()
    >
    > DownAllFilesName = Directory.GetFiles(DownDirPath, "*.*")
    Raterus Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139