asp.net - Uploading Large files to YouTube API (.NET) -


i trying upload videos youtube api... it's working fine if video file < 4 mb..

below code.. think issue related request length?!

update: error getting "cannot close stream until bytes written."

upload code

youtuberequestsettings settings = new youtuberequestsettings("app name", "developerkey", "username", "password");         youtuberequest request = new youtuberequest(settings);          request.settings.timeout = 9999999;          video newvideo = new video();          newvideo.title = "movie size 3 mb";         newvideo.tags.add(new mediacategory("autos", youtubenametable.categoryschema));         newvideo.keywords = "cars, funny";         newvideo.description = "my description";         newvideo.youtubeentry.private = false;         newvideo.tags.add(new mediacategory("mydevtag, anotherdevtag", youtubenametable.developertagschema));          string videopath = "c:\\1.flv";          newvideo.youtubeentry.mediasource = new mediafilesource(videopath, getcontenttype(videopath));         video createdvideo = request.upload(newvideo);          litmessage.text = "video " + newvideo.title + " uploaded."; 

web.config

<httpruntime     executiontimeout="240"     maxrequestlength="40960"     requestlengthdiskthreshold="80"     usefullyqualifiedredirecturl="false"     minfreethreads="8"     minlocalrequestfreethreads="4"     apprequestqueuelimit="5000"     enablekerneloutputcache="true"     enableversionheader="true"     requirerootedsaveaspath="true"     enable="true"     shutdowntimeout="90"     delaynotificationtimeout="5"     waitchangenotification="0"     maxwaitchangenotification="0"     enableheaderchecking="true"     sendcachecontrolheader="true"     apartmentthreading="false" /> 

i don't think it's request length. afaik use when receiving uploaded file. seems me there's timeout somewhere. raise timeout value in both code , httpruntime portion of web.config , see if works.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -