Below is the classic asp code that raises "Permission Denied" error on trying to create a folder in a 2012 windows server from application published in another 2012 windows server. The windows server has IIS 8.5 and the application pool is integrated 4.0 with identity as ApplicationPoolIdentity.
Dim oFS, oF
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
If Not oFS.FolderExists(basefolder) Then
Set oF = oFS.CreateFolder(basefolder)
Set oF = Nothing
End If
Set oFS = Nothing
Here basefolder is the path in which the new folder is to be created. Any suggestions to make it work would be appreciated.