Reputation: 862
I am fairly new to web development and I have been looking for a way to download torrent-files using ASP.NET C#.
It would work like this:
User uploads a torrent file or magnet link to the website.
The website downloads the torrent contents into a folder on the web server.
I came across something called: 'mono-torrent' for C#, but apparently this does not work with ASP.NET. I know Node.JS has something called 'node-torrent'... so it should be possible with C#, right?
If someone can please help me out or point me into a general direction on how to achieve this... I have been looking everywhere on the internet on how to do this with ASP.NET. I do not have access to RDP (Remote Desktop Services) unfortunately.
Thanks in advance!
Upvotes: 0
Views: 1623
Reputation: 1
You can download torrent files using ASP.NET C# by using a library called MonoTorrent. However, it is pretty old and complicated code ¹. Another alternative is Leak, which is actively developed and has decent documentation ¹. Here is a general direction on how to achieve this:
Since downloading a torrent is usually a long-running task, you'll need some extra thinking to offload jobs to background thread and persist them between application restarts ¹.
Upvotes: 0
Reputation: 10604
What do you mean by "does not work with ASP.NET"? Apart from the fact it's pretty old and complicated code, it should be working in any .NET application. However, Leak may be a viable alternative since it seems to be developed actively and has decent documentation.
It should be noted, since downloading torrent is usually a long-running task, you'll need some extra thinking (1,2,3 etc.) to offload jobs to background thread and persist them between application restarts.
Upvotes: 1