[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Using File System Object not working properly

Asked by icompass in Miscellaneous Web Development

Tags: file, system, object

am experiencing a problem using certain methods of the ASP file system object.  It seems I can add files no problem, but if i try to edit them, or delete them, or even just access the files directly, my page just hangs and nothing happens.  At this point, I have to close all my browsers, and stop and start the site, or it will not respond at all.

I am running my site in IIS 5.0 running on Windows XP (I have to test on my development machine, then push live to W2K server)

Here is a sample of the code I am using:



     set objFSO = Server.CreateObject("Scripting.FileSystemObject")
     if objFSO.FileExists(Server.MapPath(strFilePath)) then
       Response.Write "about to try to delete: " & strFilePath & " <-- can't delete file"
        objFSO.DeleteFile strFilePath
     end if


This is the output i get:

about to try to delete: files/{55572635-9AD9-4986-B820-493024D88931}_3eyes.jpg

So i know the file exists, it is getting into the loop.

However, all that happens it the page hangs, and will not continue loading at all.  I need to close the browser, and stop and start the default website in IIS to get the page to load again.

The same thing happens when i try to rename a file, here is a sample of that code:

       set objFSO = Server.CreateObject("Scripting.FileSystemObject")
       if objFSO.FileExists(Server.MapPath(strFilePath)) then
         Response.Write "about to try to edit:<BR>" & Server.MapPath(strFilePath)
         set objFile = objFSO.GetFile (Server.MapPath(strFilePath))
       end if

I have previously asked this question here:

http://www.experts-exchange.com/Web/Q_20727106.html

I accepted the answer, as it made the problem go away.

BUT, then i went for lunch, and accepted one of microsofts XPs updates, and the problem is back.  And worse yet, running the fix again did not help.  I was convinced that it must be something to do with the permissions on the file and i tried changing them, the ones for the folder, permissions in IIS etc, and rebooted, and it was working for a while again, but then later stopped again, with no changes to the code.

A coworker tried it on his machine, and it was working for him as well for a while, then suddenly stopped for him as well (i'm not sure if he downloaded the update or not)

There are two other solutions suggested in the previous question:

-put the code in a .vbs file, and use create instead of server.createobject to make the FSO.
I don't think this is the answer, simply because i have done this many times using just ASP files, there should be no problem.  Also, I'm writing a class, and i'd like it all to be encapsulated all within one file.

-use some error trapping to catch the error.
I don't think this is the solution, because my page is not even giving an error, or getting to the delete itself for that matter.  It simply stops responding on the line:

strFilePath = Server.MapPath("/files/{541BB8D5-BC0B-4537-9620-19F67275CAAA}_abt.jpg")

I need to access this file to physically delete it.
[+][-]09/06/03 03:42 PM, ID: 9303064Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/07/03 12:14 AM, ID: 9304069Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/07/03 12:56 AM, ID: 9304147Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/07/03 10:56 AM, ID: 9305485Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/08/03 08:37 AM, ID: 9310166Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/08/03 08:40 AM, ID: 9310181Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/08/03 10:20 AM, ID: 9310718Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/08/03 11:27 AM, ID: 9311036Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/08/03 11:51 AM, ID: 9311213Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/08/03 11:53 AM, ID: 9311230Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/08/03 12:00 PM, ID: 9311296Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/12/03 06:29 PM, ID: 9350178Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Miscellaneous Web Development
Tags: file, system, object
Sign Up Now!
Solution Provided By: sammurai
Participating Experts: 6
Solution Grade: A
 
[+][-]09/15/03 08:31 AM, ID: 9363725Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89