Hello,
I'm receiving an HTTP 400 Bad request when invoking a .Net WSE2 Web Service
with a DIME attachment.
If I send a short file, say 500 KB, everything runs fine, but when I send a
bigger one (2 or 3MB), I receive a Bad Request.
After reading some posts about this issue, I created appropriate entries in
Web.config to allow large requests, but the problem persists.
I have the following values in Web.config, in their appropriate sections:
<!-- web settings -->
<!-- Set the maximum http request length (in KB), so that large attachments
are supported -->
<httpRuntime maxRequestLength="262144"/>
<!-- wse 2 settings -->
<messaging>
<!-- Set the maximum http request length (in KB), so that large
attachments are supported -->
<maxRequestLength>262144</maxRequestLength>
</messaging>
I notice the following event recorded in Application Event:
HTTP/ASMX Message Receive Failure:
Microsoft.Web.Services2.Dime.DimeFormatException: WSE309: The Type_T of the
middle record chunk must not be 0 (Type_T=Unchanged).
at Microsoft.Web.Services2.Dime.DimeRecord.CheckValid(String type, String
id, TypeFormat typeFormat)
at Microsoft.Web.Services2.Dime.DimeRecord.ReadHeader()
at Microsoft.Web.Services2.Dime.DimeRecord.ReadBody(Byte[] buffer, Int32
offset, Int32 count)
at Microsoft.Web.Services2.Dime.DimeStream.Read(Byte[] buffer, Int32
offset, Int32 count)
at Microsoft.Web.Services2.StreamHelper.BinaryCopy(Stream from, Stream
to, Int32 bufferSize)
at Microsoft.Web.Services2.Dime.DimeAttachmentCollection..ctor(DimeReader
reader)
at
Microsoft.Web.Services2.Messaging.SoapDimeFormatter.Microsoft.Web.Services2.Messaging.ISoapFormatter.Deserialize(Stream stream)
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)
Any clue?
Thanks,
Nuno Guerreiro
Ingo Eichenseher - 30 Oct 2005 08:25 GMT
Try to check if timeouts are a problem.
I had the same problem using a slow network connection. (ISDN)
Changed Timeout values in IIS Settings and
also <executionTimeout> in web.config
The SoapClient also has a Timeout member which is important.
I wasn't able to change this value via app.config.
Setting all timeout values high enough i was able
to send larger Attachments.
Ingo