- Home /
Security Sandbox on the webplayer 3.0
The official documentation ("Security Sandbox on the webplayer 3.0") says:
Inability to use reflection to change private fields / call private methods in types that you did not write yourself.
Shouldn't this imply I'm OK to use reflection to query public fields in types? Apparently no: I get MethodAccessException when running the following code in the web player:
string ass = Assembly.GetCallingAssembly().GetName().Name;
I need the name of the calling assembly to implement my custom diagnostic output (since the normal System.Diagnostic is not available from the web player).
Any workaround for that?
Thanks in advance!
Answer by soonts · Dec 22, 2010 at 11:13 AM
Well, not exactly the assembly name, but instead the calling type name, which is OK for my purpose, and works in the web player:
var sf = new System.Diagnostics.StackFrame( 1 );
string component = sf.GetMethod().DeclaringType.Name;
Your answer
Follow this Question
Related Questions
Data security of Web player 0 Answers
Web Player and security 0 Answers
WWW fails in Webplayer but not Standalone 0 Answers
How do I protect my webplayer from beeing used from other sites? 2 Answers
TCPClient on webplayer crashes. 1 Answer