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

  1. #1

    Default Directory creation

    I want to create a directory on my web server from within code. I've tried
    using Request.PhysicalApplicationPath() to get the location of the
    application, and appended my new directory on the end and used
    Directory.CreateDirectory which fails with:

    System.IO.DirectoryNotFoundException: Could not find a part of the path
    "d:\". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
    System.IO.Directory.InternalCreateDirectory(String fullPath, String path) at
    System.IO.Directory.CreateDirectory(String path) at ...

    BUT if I manually create the directory in an FTP program, and use
    Directory.Exists, it manages to find the directory... the problem just
    appears to be creating.

    Any clues?

    Cheers

    Sparky


    Sparky Guest

  2. Similar Questions and Discussions

    1. Creation of ASPNET user in Active Directory 203
      Hello, I unable to see ASPNET user in Active directory 2003. I installed asp.net on windows 2003 & IIS. So please tell me how to create ASPNET...
    2. Active Directory Search fails ("The directory service is unavailab
      Hi all, I'm having one of those nerve wrecking errors, when trying to perform a simple search in an Active Directory. The objective of the code...
    3. Server cannot access application directory ... The directory does not exist or is not accessible because of security settings
      If you are using Windows XP in a Workgroup, rather than a Domain, then by default "Simple Filesharing" is turned on, and you won't see a security...
    4. Server cannot access application directory... The directory does not exist or is not accessible because of security settings.
      Hi, I have this issue with the error below. Let me explain my goal and my server environement: Goal: To have 3 separate web servers reading...
    5. rsync exclude file - directory name without directory contents
      When using rsync to maintain incremental backups significant space can be saved on the backup server by excluding directories that have non-critical...
  3. #2

    Default Re: Directory creation

    It's probably a security issue. By default ASP.NET runs under the ASPNET
    user account. This account does not have a lot of permissions on your
    machine. Simply grant it full read, write & create permissions to the path
    you're specifying on your server.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "Sparky" <mark.smith@nospam.farmade.com> wrote in message
    news:O0LIu0EUDHA.2228@tk2msftngp13.phx.gbl...
    > I want to create a directory on my web server from within code. I've tried
    > using Request.PhysicalApplicationPath() to get the location of the
    > application, and appended my new directory on the end and used
    > Directory.CreateDirectory which fails with:
    >
    > System.IO.DirectoryNotFoundException: Could not find a part of the path
    > "d:\". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
    > System.IO.Directory.InternalCreateDirectory(String fullPath, String path)
    at
    > System.IO.Directory.CreateDirectory(String path) at ...
    >
    > BUT if I manually create the directory in an FTP program, and use
    > Directory.Exists, it manages to find the directory... the problem just
    > appears to be creating.
    >
    > Any clues?
    >
    > Cheers
    >
    > Sparky
    >
    >

    Steve C. Orr, MCSD 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