Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Basically what I'm trying is redirect requests to an ASMX web service to another ASMX web service. For simplicity's sake let's say I have an ASMX web service with Hello method only and simple soap extension like this one (let's ignore the log entries code). The differences in my soap extension code are:

1) I want to not call the method so at BeforeDeserialize stage I do nothing (i.e. I do not copy oldStream to newStream and do not set newStream.position to 0)

2) at AfterSerialize stage I form response stream from an XML file with proper tags and content and I copy this response stream to oldStream.

It works fine if the size of the XML is less or equal to 65536 bytes. If I add just one more character and size gets increased to 65537 bytes I get error in the client code where I call the Hello method saying "Response is not well-formed XML.". If I still call the method in 1) it works fine but my task is not to call the method. Please note I have ASMX not WCF web service and I have no bindings settings in my web.config. I'm using C# VS 2010 Framework 2 but I get same issue with Framework 4.

How do I change that response size limit?
Thanks in advance.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900