i tried doing this- http://thewayithink.co.uk/post/2010/05/04/Mac-Address-in-Silverlight-4.aspx
but the 3 conditions are always false :
if ((Application.Current.IsRunningOutOfBrowser) &&
(Application.Current.HasElevatedPermissions) &&
(AutomationFactory.IsAvailable))
i guess its because of permissions and security stuff.. is there any way i can get the physical IP address off the client's side? as i said, i use silverlight 4.
The security model of Silverlight is such that you can't access anything from the client machine outside the browser sandbox and the (small) amount of disk space allocated to isolated storage. The client machine's MAC address would fall into that category. You can however run your application "Out of Browser" (OOB) with elevated privileges which is what this test is checking for.
The first condition states that you must be running out of browser - so the first question is "Is your application OOB enabled and running out of broswer?".
If not then the test will fail.
Then if the application is running OOB it must also be running with elevated permissions. Is this the case?
As for the AutomationFactory test - the answer on this post implies that it will be true when the application is running out of browser with elevated permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With