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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -