Hi, i'm hoping someone can help with a slightly odd problem i have. I have a piece of code that can create a folder on a sharepoint site from one machine, but not another.

If Not System.IO.Directory.Exists(strTargetLocation) Then
          End If

Originally it was because WebDAV was not running on the machine that didn't work, but now, even though it is started and can see the sharepoint folders, i get the following error

Access to the path '\\myrandomsite\subfolder\subfolder2' is denied. mscorlib at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)
at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity)
at System.IO.Directory.CreateDirectory(String path)
at ExportProcessor.Export.ProcessTask(Object lobj)

I can create the folder manually from the failing machine. i have even impersonated an administrator in the code, but still no luck. would be grateful for any tips/hints/ideas/straws to grasp.


8 Years
Discussion Span
Last Post by Ranx

Problem seems to be solved. Not sure what happened, our MIS dept added the portal to the "Trusted Sites" list on the server while i was away and apparently it now all works. THanks anyway

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.