When trying to upload .cs, .java, .aspx, etc. files. with the Multiple Upload Documents window, these files fail even though these extensions are allowed by Sharepoint. So, the problem comes from elsewhere. Sharepoint is hosted with IIS which blocks certain types of files by default, especially all the files related to the development of a site (cs, aspx, config, …). You must enable these extensions in IIS configuration too.
- Open IIS Manager
- Select the site corresponding to Sharepoint (by default, "Sharepoint - 80")
- Double click on "Request Filtering"
- Select the desired extension and click "Remove"
There you go.