strange exception caused by DirectX?
-
Hi, I'm getting a strange error when trying to run my form with DirectX on another computer (on my own it's fine). I get: Additional information: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. This problem has popped up ever since I added a panel that uses DirectX. To see if it could be something I did, I ran a simple, beginner directx file (from Tom Miller's Managed DirectX 9 book) on my computer and then copied those files to the other computer, and it again didn't work, although this time giving me the error: An unhandled exception of type 'System.Security.SecurityException' occurred in Lights.exe Additional information: Security error. I then added messageboxes to see how far the thing ran before having issues. It didn't go far. I start with the usual
Main()
entry point:Application.Run(new Tabs());
Thenprivate Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...}
Then underInitializeComponent() { MessageBox.Show("start-ic"); ... }
When running the program, the "begin" messagebox appears ("start-ic" doesn't), and a Just-In-Time Debugger pops up. I run a new instance of Visual Studio .NET, the line after InitializeComponent() gets the yellow highlighting, and the System.Security.SecurityException warning comes up (the long version from above). I've found info from people having the same exception as my first one, but they're all getting those errors when trying to connect to a database or the web which I definitely don't do. Any ideas why this could be happening? It works fine on another computer if I create a plain form. Thanks for any help/ideas!!! Mel :confused: -- modified at 16:31 Wednesday 12th April, 2006 -
Hi, I'm getting a strange error when trying to run my form with DirectX on another computer (on my own it's fine). I get: Additional information: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. This problem has popped up ever since I added a panel that uses DirectX. To see if it could be something I did, I ran a simple, beginner directx file (from Tom Miller's Managed DirectX 9 book) on my computer and then copied those files to the other computer, and it again didn't work, although this time giving me the error: An unhandled exception of type 'System.Security.SecurityException' occurred in Lights.exe Additional information: Security error. I then added messageboxes to see how far the thing ran before having issues. It didn't go far. I start with the usual
Main()
entry point:Application.Run(new Tabs());
Thenprivate Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...}
Then underInitializeComponent() { MessageBox.Show("start-ic"); ... }
When running the program, the "begin" messagebox appears ("start-ic" doesn't), and a Just-In-Time Debugger pops up. I run a new instance of Visual Studio .NET, the line after InitializeComponent() gets the yellow highlighting, and the System.Security.SecurityException warning comes up (the long version from above). I've found info from people having the same exception as my first one, but they're all getting those errors when trying to connect to a database or the web which I definitely don't do. Any ideas why this could be happening? It works fine on another computer if I create a plain form. Thanks for any help/ideas!!! Mel :confused: -- modified at 16:31 Wednesday 12th April, 20061. Make sure the Managed DirectX runtime is installed on the target machine. 2. Make sure you're not running the application from a network share.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: I luv teh choco The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hi, I'm getting a strange error when trying to run my form with DirectX on another computer (on my own it's fine). I get: Additional information: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. This problem has popped up ever since I added a panel that uses DirectX. To see if it could be something I did, I ran a simple, beginner directx file (from Tom Miller's Managed DirectX 9 book) on my computer and then copied those files to the other computer, and it again didn't work, although this time giving me the error: An unhandled exception of type 'System.Security.SecurityException' occurred in Lights.exe Additional information: Security error. I then added messageboxes to see how far the thing ran before having issues. It didn't go far. I start with the usual
Main()
entry point:Application.Run(new Tabs());
Thenprivate Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...}
Then underInitializeComponent() { MessageBox.Show("start-ic"); ... }
When running the program, the "begin" messagebox appears ("start-ic" doesn't), and a Just-In-Time Debugger pops up. I run a new instance of Visual Studio .NET, the line after InitializeComponent() gets the yellow highlighting, and the System.Security.SecurityException warning comes up (the long version from above). I've found info from people having the same exception as my first one, but they're all getting those errors when trying to connect to a database or the web which I definitely don't do. Any ideas why this could be happening? It works fine on another computer if I create a plain form. Thanks for any help/ideas!!! Mel :confused: -- modified at 16:31 Wednesday 12th April, 2006Hi! You can set .NET security settings from a control panel: Microsoft .NET Framework 1.1/2.0 Wizards. Could it be that you're running your program from a non-local disk? In that case, the framework won't allow the code to do everything locally running code is allowed to do. But you can adjust the permissions using the afforementioned control panel. Regards, mav -- Black holes are the places where god divided by 0...
-
Hi! You can set .NET security settings from a control panel: Microsoft .NET Framework 1.1/2.0 Wizards. Could it be that you're running your program from a non-local disk? In that case, the framework won't allow the code to do everything locally running code is allowed to do. But you can adjust the permissions using the afforementioned control panel. Regards, mav -- Black holes are the places where god divided by 0...