Hi Trygve, In the second line of your code you are doing an unsafe object casting. It means that you are casting to an object type InputStream, but without checking that your object is of type InputStream . It will give you a runtime error in case your object is not of the type InputSteam. You can read more about it in this article: https://docs.microsoft.com/en-us/dotnet/csharp/how-to/safely-cast-using-pattern-matching-is-and-as-operators It might not help you with your problem, but since you pasted this code I thought it could be a good advice. BR, Rolf Henrik
... View more