|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HELP: CreateFolder generates Permission Denied error
I have these two lines in my ASP code
set file=Server.CreateObject("Scripting.FileSystemObject") set folder=file.CreateFolder("c:\inetpub\www\newfolder") it is giving me the following error: ## Microsoft VBScript runtime error '800a0046' Permission denied ## Please help. |
|
#2
|
|||
|
|||
|
Perhaps you don't have permission to this folder? if you are trying to create a file in the IIS root directory then the path is c:\inetpub\wwwroot\ . However, it is probably better to use server.mappath() in case you wish to move your application, or something. Plus, where is the ASP file located? If it is outside your application, then parent paths will need to be enabled.
You will also need to make sure you give application "write" access in the IIS control panel. |
|
#3
|
|||
|
|||
|
Thanks.
I am using server.mappath. My ASP script is in www root. e.g. c:\inetpub\www\myscript.asp The target folder "mynewfolder" to be created is supposed to be at c:\inetpub\www\allsubsites\mynewfolder I've ensured that IIS web site property allows for script writing. Directory permission is also set to allow script to write for c:\inetpub\www\allsubsites Any other suggestions? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > HELP: CreateFolder generates Permission Denied error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|