Newbee - need to download one file a day via a .NET console app
I need to automate the download of a single file every morning via a .NET Console app. I even know the file name of the file that the client uploaded. Can't be that hard, right?
The Box.V2 code I downloaded from GitHub won't compile on my system (win7pro, VS2015 professional Update 3). 13 Errors and 767 warnings. We are targeting Framework 4.5/4.6.
Any tips, tricks links or tidbits of knowledge would be greatly appreciated. It can't be THAT hard to do. 🙂
Thanks,
Lou
-
I use the .NET code in one of my apps, but if all you want to do is download a specific file on-demand, you might want to skip all the extra Box functionality in the library/assembly and just use straight HTTPClient (more likely HTTPWebRequest) and a shared link to the file. That way you (or your client) can share the file and manage access directly from Box.
You may still need to deal with OAuth or JWT, which can be confusing if you're just getting started with that...but there are also some helper lib's out there to facilitate that.
If you get the OAuth2 running, you could also then use the HTTPWebRequest or one of the REST-helper libs to fetch the file using the Download File call if you have the file's ID.
So the skinny of this is, if you're only trying to make 1-2 calls to Box, you can do it via the direct REST calls and skip fighting to compile the dll-project.
Please sign in to leave a comment.
Comments
1 comment