Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. strange exception caused by DirectX?

strange exception caused by DirectX?

Scheduled Pinned Locked Moved C#
helpcsharplearningdatabasevisual-studio
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    melanieab
    wrote on last edited by
    #1

    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()); Then private Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...} Then under InitializeComponent() { 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

    J M 2 Replies Last reply
    0
    • M melanieab

      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()); Then private Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...} Then under InitializeComponent() { 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

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      1. 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

      1 Reply Last reply
      0
      • M melanieab

        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()); Then private Tabs() { MessageBox.Show("begin"); // // Required for Windows Form Designer support // InitializeComponent(); panel1.Visible = false; tabControl1.Visible = true; ...} Then under InitializeComponent() { 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

        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        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...

        M 1 Reply Last reply
        0
        • M mav northwind

          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...

          M Offline
          M Offline
          melanieab
          wrote on last edited by
          #4

          Thanks! That worked. Mel :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups