WCF - How to Increase Message Size Quota

后端 未结 13 2051
失恋的感觉
失恋的感觉 2020-11-22 06:16

I have a WCF Service which returns 1000 records from database to the client. I have an ASP.NET WCF client (I have added service reference in asp.net web application project

13条回答
  •  忘了有多久
    2020-11-22 07:02

    The WCF Test Client has it's own client config.

    Run the test client and scroll to the bottom. If you double click the Config File node you will see the XML representation. As you can see the maxReceivedMessageSize is 65536.

    To edit this, Right Click the Config File tree node and select Edit With SvcConfigEditor. When the editor opens expand Bindings and double click the binding that was automatically generated.

    You can edit all the properties here, including maxReceivedMessageSize. When you are done click File - Save.

    Lastly, when you are back at the WCF Test Client window, click Tools - Options.

    NOTE: Uncheck the Always regenerate config when launching services.

提交回复
热议问题