WebDAV in SSIS
I was recently working on a business intelligence project that required pulling files from a Sharepoint document library. The initial decision was to net use
the share, however I quickly realized that it wouldn’t work correctly when run from Windows Server.
I had two choices to resolve this issue:
- Install the
Desktop Experience
feature. - Use a custom
script task
to pull the file.
I opted for the latter because I prefer not installing unnecessary junk on my production servers. Since .NET is already installed, why not use it?
WebDAV is a simple enough standard to implement as it uses GET and PUT methods to do the file transfers so I wrote a simple class to do just that.
The code was a bit too long to just throw in the page, but I put it in a gist for your pleasure. Feel free to use it however you please.