Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2005

Tip: Looking for answers? Try searching our database.

400 Bad request error in DIME attachment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nuno Guerreiro - 21 Oct 2005 16:11 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.