i uploading file c# application asp.net website, both written me have access code.
but, working text file (1kb) not mov file (77mb).
in both cases, using uploadprogresschanged progress. txt file goes 100% while mov file goes till 50%. when done, find txt file saved on server not mov file.
why happening? how can work?
windows app code - c#
client.uploadfileasync(new uri("http://localhost:xxxxxx/default.aspx"), "c:\\1.mov");
default.aspx code - vb
protected sub page_load(...) handles me.load if request.files isnot nothing if request.files.count > 0 request.files(0).saveas(server.mappath("~/1.mov")) response.write("file saved at: " + server.mappath("~/1.mov")) else response.write("at least 1 file should sent") end if else response.write("no file received") end if end sub
you can change default limit (4mb) in localized way dropping web.config file in directory upload page lives. way don't have allow huge uploads across whole site(doing open kinds of attacks).
here's example production app. 1 set 100mb:
<configuration> <system.web> <httpruntime maxrequestlength="100000" executiontimeout="600" /> </system.web> </configuration>
Comments
Post a Comment