c# - SharePoint ashx handler file download Problem -
i have ashx handler gets file using, in sharepoint, , checks kind of file , writes using response.binarywrite
. file server, contains of our files. when go download file thats 3mb works fine. when go download 30mb or 40mb file error.
exception of type 'system.outofmemoryexception' thrown. @ system.string.getstringforstringbuilder(string value, int32 startindex, int32 length, int32 capacity)
i checked application pool @ have set @ 1.5gb virtual , 1gb actual memory. out of ideas , dont know go next have ideas?
case "pdf": context.response.contenttype = "application/pdf"; context.response.addheader("content-disposition", "inline; filename=" + asset.a_name); } context.response.binarywrite(content);
you may want try response.transmitfile method, not buffer content in server memory.
Comments
Post a Comment