views:

557

answers:

4

First - I know XP isn't great at hosting, but as the site is only for my personal use, and I already have an XP licence, that's what I'm using...

I'm using the pure asp upload script from link text to upload images to a website hosted on a Windows XP Pro pc.

The upload script works great on other sites I have developed but these were all using IIS 6 or above.

The problem I'm having is uploading files bigger than about 200K.

There is a Microsoft support page link text that seems to answer my problem. But, I have followed the instructions and am still getting the same problem.

I also found another article on the same problem - link text - this one says that "On IIS 5.1 you cannot change the File Upload Limit."

Does anyone have a definitive answer - does the AspMaxRequestEntityAllowed property in the IIS 5.1 metabase have any effect?

If not, is there a work around for this scenario?

Thanks for your help!!

A: 

how about your time out time when uploading those files? Maybe you should add more time. Or your test is local?

You can always install xampp in windows xp :P

Chocolim
The server is local. I wondered about timeout, so increased it - but no difference.
JezB
A: 

This document states that you change the web config file to alter the max file upload size to close to two gigs of data:

In case of IIS 5.1, 6.0:

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="2097151" />
  </system.web>    
</configuration

You may also need to extend the time out for the upload also by doing this:

HttpContext.Current.Server.ScriptTimeout = 2400; // timeout in seconds.

Jon Galloway has a good article that goes into some detail about this.

Hope this helps you out some.

Chris
He is using asp Classic, no web config there
Eduardo Molteni
Chris
Chris - that's what I was worried about! But thanks anyway.
JezB
A: 

The link that Chris has posted probably covers it but just for sake of completeness I'll put my oar in.

The default AspMaxRequestEntityAllowed for IIS5.1 onXP is 1GB. This is the same for IIS5 on Windows 2000. As of IIS6 this default limit was reduced to 200K.

If your problem is indeed that you have hit this limit it means that at some point something has modified your Metabase to include this limit.

Its most likely that this limit has been set at the W3SVC level. You can check the current level with:-

cscript adsutil.vbs get w3svc/AspMaxRequestEntityAllowed

Noet though that since it has been set its possible that its been set on the default website rather than at the w3svc root. In which case following instructions to set it on the root won't help because the value on the default website will take precedence. Check the default website value with:-

cscript adsutil.vbs get w3svc/1/AspMaxRequestEntityAllowed
AnthonyWJones
JezB
A: 

Go to http://support.microsoft.com/?kbid=260694. I had exactly the same problem and this worked for me:

To change the maximum size of a URL request, perform the following to add the MaxClientRequestBuffer registry value:

  1. Run the Registry Editor (Regedt32.exe).
  2. Locate the following key in the registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters

  3. From the Edit menu, select Add Value, and then add the following registry value:

    Value Name: MaxClientRequestBuffer

    Data Type: REG_DWORD

  4. In the DWORD Editor dialog box, under Radix, select Decimal. In the Data text box, type the number of bytes for the maximum URL request size.

    Note You must restart the IIS service for the changes to take effect.

lubos hasko