cannot create the file - make sure that the path and filename are correct.

Posted on 2011-10-04
Last Modified: 2012-05-12
Info: Windows Server 2008 R2; Windows XP Pro SP3; Windows 7 Pro.

We have a user (using XP Pro) who has an .asp file that controls whether an Access db is available or not by changing a line in the .asp file from true to false and vice versa. This worked for them for years on Win2003 and IIS 6.

We've upgraded to Win2008 R2 and IIS 7.5.

Here's the problem I'm trying to solve.

When he edits the file and tries to save it he gets the msg. "Cannot create the z:\folder\filename.asp file.  Make sure that the path and filename are correct."  I have the same problem and I'm a member of the domain admin group and using XP Pro also.

I've checked permissions, he has "Full permissions" to the folder where the .asp file is located.  And he can create and delete folders and files within the folder where the .asp file is located.  He can edit the file and save it with a different file name.  He is in the Power Users group, not in the Admin group.  So he can't open Notepad using the Run As cmd to escalate his privileges to Admin.

Because it's an .asp file does he need write permissions to the folder where the temporary IIS files are stored? I'm thinking that because it's a .asp file it's something permission related that I'm missing.  There's some folder that he needs write permissions to other than the one where the .asp file is located.  What else would prevent him from saving this file and throw that err msg?

Note that if he\we use a Win 7 Pro pc it's not a problem.

I've googled the err msg and searched in the technet forums and I'm not finding a solution.  I'm sure someone else has solved this problem for someone but I've not found it yet.  If you need additional info let me know.
Question by:mobot

    Author Comment

    This may be a file locking issue rather than permissions.  The control.asp file is hit every time the front end form file is accessed.

    What puzzles me is why it's not a problem if we use XP, Win2003, and IIS6, or if we use Win7 Pro, Win2008 R2, and IIS7.5.  The combo of XP and Win2008 R2, and IIS7.5 produces the problem.

    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    so he is using notepad to open the file ?? why not just have 2 copies of the file..
    and just do a
    ren accessdenied.asp filename.asp
    to deny access
    ren accessok.asp filename.asp

    LVL 26

    Expert Comment

    Not really sure.

    >> Can you try stopping the "Default Web Site" @ the IIS7.0
    >> can you stop the "IIS Admin service" on that computer....then try editing the same file?
    Is that allowed?

    Accepted Solution

    ve3ofa - we can try that on Monday.

    e aravind - I can't stop IIS and test it.

    We have the content on a pair of servers setup as a cluster.  We have a pair of IIS servers setup using MS load balancer, but IIS is not setup as a shared config.  We use a domain account to connect from the IIS servers back to the file servers where the content is stored.  This domain account also runs the app pools.
    If I grant that domain account full permissions to the .asp file we can edit and save the file.  Just learned of this, this morning.

    ve3ofa - I'll try your solution on Monday.

    If you guys have any other ideas let me know.

    Author Closing Comment

    granting the domain account that runs the app pools permissions to the files and folders is the solution.

    Featured Post

    Too many email signature changes to deal with?

    Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

    Join & Write a Comment

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
    This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now