-
Hi all! I have some code in my ASP that uses the file system object. The code runs great on my local machine but doesn't on the ISP. I know it's a security thing, I just can't seem to find the setting to make it work. Here's the code:
Code:
xFileName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "\Time\timeSheets.xml"
Set fs = Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(xFileName) Then
fs.DeleteFile(xFileName)
End If
It fails on fs.DeleteFile. I have another page that fails when trying to create a file. My ISP is not much help. Aside from the fact that it takes days and days to get them to look at it, they never seem to know how to fix it! BTW, I made sure that Write access was checked in IIS and gave EVERYONE write access.
-
For anyone that is wondering...
1. Open the explorer
2. Browse to the folder you need write access own ("C:\Inetpub\wwwroot\yourweb\yourfolder")
3. Right click on the folder and select Permissions.
4. Find the user named IUSR_YourServerName. Double click on that user.
5. Now select the options you want the person to have. I selected Full control on this folder only, which contained just the files that were needed to be overwritten. I would not recommend changing this setting on your whole website...