views:

17

answers:

1

Hello,

I am trying to make my ASP page to create a folder on a directory path. I am getting an error:

Microsoft VBScript runtime error '800a0046'

Permission denied

I now its somthing to do with IIS 7 IUSR permission for the folder.

The code is below.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% dim strUserName foldername= "myfolder" dim fObject,f set fObject=Server.CreateObject("Scripting.FileSystemObject") response.write(server.mappath("\")&"\test\"&foldername) set f=fObject.CreateFolder(server.mappath("\")&"\Letters\"&foldername) set f=nothing set fObject=nothing response.write("folder created successfully
")

%>

A: 

Got it fixed, I had to add IUSR user and IIS_IUSRS group (for IIS 7 only) as my Security settings to my virtual directory folder that propagates to the sub folders.

If additional permission is required for specific sub folders, then add additional permission by right clicking the folder name, and select Properties. Click on Security tab on the Properties window and click Edit button. Select the user or group to add additional permission

slao.it