ASP Error ‘ASP 0104: 80004005’

As a follow up to the new hardware added the other day, I had to fix a problem in an administration section of a site. The page in this case, allowed you to upload files (images and so forth) to the server and manage the files. This was all working as expected on the existing box (Windows 2000 Server/IIS5), however after moving to a new one (Windows 2003 Server/IIS6), we had some problems.

What follows is the short error message:

  1. Request object error 'ASP 0104 : 80004005'

After inspecting and changing some code, the error was caused by invalid permissions on the file system where the files where being written to. At some point, the previous servers directory permissions had been changed to allow the IIS user writing permissions to that directory.

The solution was simple and fast, change the permissions and allow IIS write/create type permissions on that particular folder.

28 thoughts on “ASP Error ‘ASP 0104: 80004005’

  1. i got this from an online source

    Yes, Pure ASP Upload supports uploading large files on the Windows 2003 server. However:

    IIS6.0 prevent the upload of files more than +200Kb. So you need to make some changes in the default IIS settings first.

    Background
    For IIS6.0 users, the AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Content-Length header is present and specifies an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS returns a 403 error response.

    This property is related in function to MaxRequestEntityAllowed, but is specific to ASP request. Whereas you might set the MaxRequestEntityAllowed property to 1 MB at the general World Wide Web Publishing Service (WWW Service) level, you may choose to set AspMaxRequestEntityAllowed to a lower value, if you know that your specific ASP applications handle a smaller amount of data.

    Solution
    Open your metabase.XML which is located in c:\Windows\System32\Inetsrv find the line “AspMaxRequestEntityAllowed” and change it to “1073741824”. This is 1GB – of course you can enter another value to suite your needs.

    NOTE: Before you edit the file, be sure to stop the IIS service first or else you won’t be able to save the file.

  2. As I have mentioned before, I find it plain frustrating that the error codes reported by ASP are so general and wide sweeping. In this case, my error was caused by lack of file system permissions, while your problem was caused by an IIS configuration issue.

    I would agree that they are both ‘permission’ related, however considering one is an operating system configuration problem and one is an application configuration error, I think that should have warranted a unique error message of some sort. Even if it was the same top level error, with the addition of small note indicating one way or the other.

    Frustrating, however nothing we can do about it.
    ;\

  3. I am trying to fix my ASP0104 errror per your recommendation. However, there’s nothing inside the insetsrv folder (c:\Windows\System32\Inetsrv ). I did numerous search on Windows already for the metabase.XML file to no avail. I’m using IIS6 btw.
    Appreciate your help. thanks

  4. Sheila,

    As I said, my particular error was caused by invalid folder permissions on the folder where the uploaded files are being saved to. Essentially, the user that your web server is running as1, requires read/write access to the folder you’ve chosen to upload the files to. If your problem is the same as mine, that will sort it out for you.

    1 The default user which IIS executes as will be something like IUSR_ANONYMOUS

    Al.

  5. I have changed “AspMaxRequestEntityAllowed” property into 5MB in my metabase.xml file. But still the problem exist the smaller files of size lessthan 200kb are uploaded, but i want to upload large files. Can u help me

    Regards,
    Senthil

  6. Hi,
    I go to a website called zabaware forum, I have uploaded images in the past to go with my posts. I had to wipe & redo my windows xp and now, I cannot delete I have on the site, nor can I add new images to posts I make. I get the same error for both situations

    Request object error ‘ASP 0104 : 80004005’

    Operation not Allowed

    /forum/outputFile.asp, line 70

    How do I fix this? Why is the error the same on trying to delete & upload a jpeg?

    Could someone email me a reply, I’d really appreciate it!

    Rick (red10@sympatico.ca)

  7. I have changed “AspMaxRequestEntityAllowed” property into 1GB in my metabase.xml file. But when i restart my IIS, IIS didn’t work. And appear 1 meseng : “.. have some error … restart windows 4 minutes …”
    after 4 minutes, my windows restart !
    :(
    help me Plz !

  8. Hi,

    For not to have the server restart, you would need to “Enable Direct Metabase Edit” in your IIS settings. To enable this follow these steps…

    1. Open IIS Manager
    2. Right click on your local computer
    3. In the Internet Information Service windows the very first checkbox is “Enable Direct Metabase Edit”.

    It worked for me.

    Thanks to Galhano

  9. Message to Galhano!
    Thank you very much for helpful tip to adjust download size limitation. Though I could not find access to parameter “AspMaxRequestEntityAllowed” on WWW IIS server user interface, it was easy to get to modify the metabase.XML file.
    Thanks for great help!!

  10. Dear Alistair,

    I have tried to change AspMaxRequestEntityAllowed within c:WindowsSystem32Inetsrv to 1073741824 using Wordpad, with Allow direct editing ON or off, and altering a copy of metabase.xml but every time i try the IIS service will not start. When I open up the file using IE I get the following error:
    The XML page cannot be displayed:

    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

    ——————————————————————————–

    A name contained an invalid character. Error processing resource ‘file:///C:/Documents and Settings/Gordon Harford/Desktop/…

    LogCu?tomPropertyName=”Cookie”
    ——-^

    It does not matter whether I directly edit the present entry ie 204800 or cut and paste.

    This is on a Windows 2003 R2 machine.

    I have managed to get the machine working again using the history of the metabase.xml.

    Can you confirm this workaround still works?

    ta

    gordon harford

  11. Gordon,

    Unfortunately, I can’t confirm that it does or doesn’t work; if you read up it was a reader who submitted the information about editing the IIS configuration file. I expect that it would still work as there are people who have posted since, which seems to indicate the method works.

    In your posted snippet above though, it appears your problem is related to the ‘?’ in the entity name. I would expect, that if you replace the ‘?’ with an ‘s’ — that IIS will begin to work correctly again.

    Regards,
    Al.

  12. Gordon, I’ve also seen the same problem with ‘?’ chars in the metabase.xml file (after having ticked “Enable Direct Metabase Edit” checkbox, and subsequently edited the metabase.xml file).

    Must be a bug in IIS – this is pain in the behind since it’s easy to replace most instances of ‘?’ but not when two of your GUIDs get messed up :-(

  13. I’ve modified the Metabase.xml file and restarted IIS 6 without any issues. However, what I’ve ran into now is…

    When uploading a file, it seems to hang the browser indefinitely (and loses the file) if its larger than 20 MB.

    Is this another setting or some kind of under run buffer?

  14. Thanks for the help, all!

    I ran into (and solved) another little problem that some might be experiencing. The file upload scripts I was using didn’t seem to like capitals or spaces. However, all small caps, no spaces, no special characters (e.g. under_scores) seems to work fine.

    ~Graham

  15. I didn’t use the “Enable Direct Metabase Edit” method described above.

    I shut down the “IIS Admin Service” and all related services. Then I edited the metabase.XML file in NOTEPAD per the instructions by Galhano in post 1. However, I set AspMaxRequestEntityAllowed=”104857600″ instead of 1GB. The number I used is approximately 100MB.

    Then I restarted the server and large file uploads worked. At least up to the 6MB test file I was using.

  16. I have aditing MetaBase.XML file time and again to allow uploading large files, but this time a strange thing has happened, I am getting the same error, and when I open the MetaBase.XML file to edit the “AspMaxRequestEntityAllowed” property, I don’t find it…. any where at all in the file.

    I am stuck! :(

  17. later on.. I just added the “AspMaxRequestEntityAllowed” property manually in the metabase.xml file with the value. and it worked for me.

    posting just to share to share with the rest.

  18. You can run the following from a command prompt while in the c:\inetpub\AdminScripts directory. Instead of editing the xml file directly.

    cscript adsutil.vbs set /w3svc/AspMaxRequestEntityAllowed 104857600

    to set to 100MB.

    To check if the command worked you can also “get” the value…

    cscript adsutil.vbs get /w3svc/AspMaxRequestEntityAllowed

    AspMaxRequestEntityAllowed : (INTEGER) 104857600

  19. Thanks for the tip. This solved my file uploading issue. I did find that to edit the xml file I had to turn off the iis service before I could save the file.

  20. I ran the following from a command line:

    iisreset /stop
    cd c:
    cd c:\inetpub\AdminScripts
    cscript adsutil.vbs set /w3svc/AspMaxRequestEntityAllowed 104857600
    iisreset /start

    and this seems to have solved the ASP Error ‘ASP 0104: 80004005′ problem. However, now the script is timing out (error ‘ASP 0113’). The upload is VERY slow even across the LAN. Approx 500KB transferred in a minute and a half.

  21. Increased the value of ASP script timeout (default was 90 seconds) to 1800 (30 minutes). This was done at the WEB SITE level, not the server, using IIS manager.

    Testing: w3wp.exe is occupying approx 50% CPU load during upload process.

    “w3wp.exe is a process associated with application pool in IIS. If you have more than one application pool, you will have more than one instance of w3wp.exe running. This process usually allocates large amounts of resources. This program is important for the stable and secure running of your computer and should not be terminated.”

    Apparently uploading this way is pretty resource intensive.

  22. I’m also having problems with this, having changed the IIS setting AspMaxRequestEntityAllowed to 5mb, I’m also finding that I can’t upload anything over 200k.

    Is there another setting I need to change? or did the initial changes not take effect? I’ve restarted the server also, and obviously it’s not file permission problems since I can upload files

  23. I am facing the same problem, but not regularly.

    At times the code works fine but after 15-20 days i get this error:

    Microsoft JET Database Engine error ‘80004005’
    Unspecified error

    /ImportLeadSubmitN.asp, line 93

    when we restart the IIS this issue is solved. can any body tell me what is the realtion of this error and IIS. database is SQL server 2000 on windows 2000 server R2.

    i am IUSR i.e have windows authentication for the login. The code uploads data from excel file to database. So it has inset query.

  24. The information here really works! Read it again if you still have the problem related to the asp-error-0104

  25. My program also encountered the same problem and it was resolved by setting the AspMaxRequestEntityAllowed value as mentioned above.

    Thank you so much to you all.

  26. I was having the same problem but I really dint want to touch my IIS server settings to much. I want to thank you guys, I posted this to my Tech support at Server Intellect and they resolved this issue for me. Thanks for the Information!

Comments are closed.