I'm building an ASP.Net mvc4 application that allows the user to send an image encoded as a Base64 string via a POST request. How to validate the user input to ensure that the base64 string is indeed an image and prevent the user from passing malicious data in the POST request? e.g. to prevent external URLs from being injected.
I found this and this which tells to do it in PHP but not Asp.net/C#.