Hello,
I need my ASP.NET application to create and delete directories. I have asked my hosting provider to setup a public folder that is has its permissions set to read/write. I know that this public folder has these permissions because my application can create and delete files inside this directory. My problem is that when I try to create a directory inside this public folder, I get the following error...
System.IO.FileNotFoundException: Could not find file "D:\business\ejewelsonline.com\html\public\test".
This is the code that I've been using (and it has been working perfectly on my development machine)...
I've been told by my hosting provider that everything is set properly on their end, but I don't know what else could be giving me the error. When I create the directory through ftp then dir.Exists = True so I know that I have the correct path the my public folder.Code:Dim strDir As String = "D:\business\ejewelsonline.com\html\public\test" Dim dir As New System.IO.DirectoryInfo(strDir) If dir.Exists = False Then 'create the directory dir.Attributes = IO.FileAttributes.Directory dir.Create() End If
Please, if anyone has any suggestions I'd be grateful if you could share them with me. I don't know whether or not my hosting provider is actually to blame or if I need to modify my code. I've been trying to resolve this for 2 days and between my and my provider, we've still yet to come up with a solution.




Reply With Quote