Results 1 to 2 of 2

Thread: IIS Security and File System Object

  1. #1

    Thread Starter
    Lively Member chrisgaddy's Avatar
    Join Date
    Mar 2001
    Location
    Olive Branch, MS
    Posts
    71

    Post

    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.

  2. #2

    Thread Starter
    Lively Member chrisgaddy's Avatar
    Join Date
    Mar 2001
    Location
    Olive Branch, MS
    Posts
    71
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width