Automating download from codeplex.com using asp.net webclient -


i trying use webclient download file codeplex.com. can download file ends being html file not .zip. looks have script redirects download file.

anyone have experience this?

here's code:

protected void page_load(object sender, eventargs e)         {          }          protected void download_click(object sender, eventargs e)         {             webclient webclient = new webclient();             webclient.downloadfilecompleted += new asynccompletedeventhandler(completed);             webclient.downloadprogresschanged += new downloadprogresschangedeventhandler(progresschanged);             webclient.downloadfileasync(new uri("http://dotnetnuke.codeplex.com/downloads/get/815672"), @"c:\dnn_platform_07.02.02_install.zip");         }          private void progresschanged(object sender, downloadprogresschangedeventargs e)         {             progressbar.value = e.progresspercentage;         }          private void completed(object sender, asynccompletedeventargs e)         {             txtstatus.text("download completed!");         } 

modify download url , check if able download.

webclient.downloadfileasync(new uri("http://download-codeplex.sec.s-msft.com/download/release?projectname=dotnetnuke&downloadid=815672&filetime=130397249034130000&build=20885"), @"c:\dnn_platform_07.02.02_install.zip"); 

that actual url obtained inspecting site firebug, when download request fired off previous url. while works current release, i'm not sure if fetch latest builds on time. suspect filetime change.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -