In my other life as a music composer I go by the moniker “Electric Trojan”. In my dealings with clients it is necessary to frequently send music files. Previously I did this via Soundcloud, but you are only allowed 3 hours of audio on the free account. As time goes by this means deleting previous WiP files thereby depriving the customer of a means of reviewing and referencing old ideas. As a result Soundcloud is not suitable for long term access and storage of completed music tracks, much to the inconvenience of both me and my end users.
Not without paying for it anyway…
Therefore, if I simply had to spend money on hosting, why not make my own, so to speak, “Content Management” system using C# ASP.NET?
www.electric-trojan.uk was the result of that endeavour.
Writing the code for this required me to sufficiently master ASP.NET, for instance:
- Entity Framework migrations for creating and altering databases
- Various data classes for the above
- Using MVC design pattern within the context of an ASP.NET project
- Implementing and modifying the identity template such that only the administrator can create new accounts
- Creating a system for allowing only certain permitted users to upload files (i.e. user roles)
- Creating a server-side system which prevents anyone from uploading a file other than .ogg or mp3
- .cshtml pages
- A download page that can serve only the files associated or assigned to a given user
- Creating a system by which the administrator can assign a track to a given users account
- Email capability, essentially so that users can reset their own passwords at their leisure
- Minimalistic and phone-friendly front end
- Admin area tools for controlling user roles and changing certain aspects of the landing page
- A contact form that can be switched off in the admin area
- Understanding the dependency inversion principle, which is an essential part of how ASP.NET makes use of services
- Dependency inversion requires a decent understanding of OOP, I never really understood interfaces in a concrete manner until I was forced to use them
- Making use of appsettings.json in order to control global settings before runtime
- Creating an upload size limit established by the appsettings.json
This is not an exhaustive list by any means.
Above is what the general user will see when logging in to check on their latest version of a piece of music.
It’s surprising the amount of work that goes into enabling what seems like a very simple function – a place to give files to people.