Skip to main content

HI all,

 

I have a file control on the smartform. User clicks on the control , a file explorer appears. User selects a file and the file control is populated with the file. User then clicks submit, which then triggers the rule which takes the document and writes it to the database. Now a file is converted by K2 into a XML string, I store this string in a nvarchar(max) field in the database. This is working perfect for file that are about 100kb or less. When i try to save a file that is bigger than 100kb, i get the error

 

"The remote server returned an unexpected response: (413) Request Entity Too Large."

 

So it looks like the file is too big. Where do I change this setting. The smartobject is built on top of a custom service object. The service object basically, speaks to a WCF webservice. The webservice then writes the file to the database. I have changed the binding of the webservice client which is the K2 server in the K2HostServer.exe.config file. Ive maxed out all the available properties in the binding such as messagesize. Is there anything else that needs to be increased. The funny thing is I have another file upload method to a different database whch works exaclty the same way and that is working normally. I have compared the two , and I canot see any differences. BTW I am getting this error on both the smartform and the smartobject tester tool.

 

Your help would be greatly appreciated.

Ah ha. Issue resolved I overlooked the server side webconfig of the the webservice. I increased the  binding message size and etc on the webservice server side and it resolved this issue.


Reply