.Net ramblings
# Thursday, 24 June 2004
Http Status 400 trying to send large DIME attachments

Testing out my new DIME attachment code with WSE2, i ran into http errors with large uploads.  The error i got was a System.Net.WebException saying that it was a bad request, Http status 400, with an event in the application log under WSE:

HTTP/ASMX Message Receive Failure: Microsoft.Web.Services2.Dime.DimeFormatException: WSE352: The size of the record uuid:c0c3c949-5fb1-4171-88aa-06ce14499e44 exceed its limit.
at Microsoft.Web.Services2.Dime.DimeRecord.UpdateTotalBytesRead...

I had the maxRequestLength set to 128000 in web.config, but i found out that this does not apply to WSE2.  adding the following entry into web.config solved the problem.

<?xml version="1.0" encoding="utf-8" ?>
 <configuration>
  <microsoft.web.services2>
   <messaging>
    <maxRequestLength>256000</maxRequestLength><!-- 256 mb -->
   </messaging>
 </microsoft.web.services2>
...

Thursday, 24 June 2004 09:49:24 (GMT Daylight Time, UTC+01:00)  #    Comments [8]  Asp.Net