Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m concerned

DownloadFile throws InvalidCastException?

Currently I'm trying to implement the DownloadFile business rule following this tutorial: https://codeontime.com/learn/upload-d...

However, after doing all of it and running the project on debug mode in Visual Studio the code gets an exception (after the user has selected the files they want to upload and clicked "Upload") on "Controller.Core.cs", line 217, "System.InvalidCastException: 'Invalid cast from 'System.String' to 'System.IO.Stream'.'".

Here are some screenshots about where the exception happens.


I have no idea what's causing this, so I have no idea how to start fixing it.
Could anybody point me in the right direction?

Thanks in advance! <3
1 person has
this problem
+1
Reply