Search code examples
silverlight-4.0assembliessystem.reflection

Get dynamically loaded assembly name in silverlight 4


I have a Silverlight 4 app that is allowing the user to upload a file, specifically an assembly. Before the file is uploaded, I would like to verify that what they've selected is actually an assembly, and I would also like to get the full name of that assembly. I'm getting a security exception when I try to use Assembly.Load(byte[]), is there a way to verify the assembly in Silverlight without actually loading the assembly? Maybe a third party assembly information loaded? Is there a reasonably simple way to examine the bytes in the byte array to determine this?

Update

The following pretty much shows me that opening the assembly is not a reasonably simple way to examine the byte array: Common Language Infrastructure

Thanks, Matt


Solution

  • This kind of validation is security sensitive and needs to be done server-side