Hello,
I have created very simple Silverlight Application that uses Silverlight 5 and I am trying to run it In-Browser but the code keeps throwing an exception when the AutomationFactory.CreateObject function is called, the exception says "This operation is not supported in the current context", I followed the steps in the below link on how to give elevated trust inside In-Browser application but with no luck:
http://msdn.microsoft.com/en-us/library/gg192793(v=VS.95).aspx
The call to Application.Current.HasElevatedPermissions property keeps returning false no matter what I tried.
The code I am trying to call is very simple (see below) and I am running the code from inside Visual Studio 2010 on my local machine by pressing F5 in the VS IDE.
var cmd = AutomationFactory.CreateObject("WScript.Shell"); cmd.Run(@"C:\windows\notepad.exe");
I also tried to disable the IE protected mode as well but still no luck, I also ran VS with Administrator privilege but it didn't work.
Any body have any idea what do I need to have elevated permissions to run the above code please?
I am attaching a snapshot for the exception message am getting since it contains the stack trace information, it might be helpful.