Directory.CreateDirectory and Permissions

Spyder94

New member
Joined
Dec 31, 2003
Messages
1
I have the following extremely simple code that works properly on my local machine, my development server, and a previous ISP that I used but does not work on my new ISP:

Dim strPath As String = Server.MapPath(MediaPath) & "\Idea_" & _
[IdeaID] & "\" & ddlType.SelectedItem.Value
If Not Directory.Exists(strPath) Then
Trace.Write("Path does not exist.")
Try
Directory.CreateDirectory(strPath)
Catch err As Exception
Response.Write(strPath & "<br>" & err.Message & "<BR>")
Exit Sub
End Try
End If

The code is trying to create two new folders (a directory and a sub directory of that directory) under the /Media folder in the site and fails.

The error I receive is:
D:\Domains\mydomain\wwwroot\Media\Idea_379\Audio
Could not find a part of the path "D:\".

Obviously the first question is: Do you have permission to create the directory? And the obvious response is, "Apparently not." So can anyone tell me what permission settings need to be made to allow this to work?

My ISP has the security set EXTREMELY tight on the server but they are also very helpful with making adjustments to make this work. We have tried every possible setting we could think of but apparently havent found the right one yet.

Any help would be greatly appreciated.

Spyder94
 
Are you applying the security permissions to the ID (ASPNet?) that your ASP.net application is running under?
 
Back
Top