Results 1 to 4 of 4

Thread: Security Exception Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Location
    Richmond, VA
    Posts
    2

    Security Exception Error

    Greetings all. I am new to Visual Basic.NET, but not to Visual Basic programming itself. I recently upgraded to the .NET platform and am really enjoying learning the new things I can do with it.

    However, I'm now finding myself in somewhat of a bind. I have a program that was written in VB 6 that works perfectly. It takes an input file and parses out the information into subsets of that file, depending on the parameters of the control files that are read into it. This has worked for a couple of years in our network environment without any problems.

    Now I've found I have to make some modifications to that program, so have recoded it using VB.NET. I've got a test environment set up on my C drive. Using that the program functions flawlessly both in the gui environment and as a compiled .exe program.

    However, when I move that into my production environment, whether in the gui or using the .exe, I get the following error:

    System.Security.SecurityException
    An unhandled exception of type 'System.Security.SecurityException' occurred in Unknown Module.

    Additional Information: Request for Permission of type System.SecurityPermissions.SecurityPermission, mscorlib, Version 1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
    Now the only difference between my test environment and the production environment is the fact that the program, and all the data files, must reside on a network share in production.

    To be honest, I'm lost here. We run a Windows 2000 Active Directory environment in native mode.

    What do I need to do to get this to run in production? I've even tried to run it using our Domain Admin account (I'm the network admin here) but still get the same error.

    Any help would be very appreciative.

    Regards,

    Jim Tomasello

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    Are you familiar with the security options? Start/programs/ Administrative Tools/Microsoft .NET Framework 1.1 Configuration?

    There are some settings in there that allow you to run/not run stuff across the network.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Location
    Richmond, VA
    Posts
    2
    Mike, thank you very much! I had no idea that configuration editor was there. Once I allowed the computer and code to have full control of my system's resources it works like a charm.

    Now, another question if I may. Is there some way to set those options through the installation program? Or is this something that I am going to have to go to each PC and set myself?

    Thanks again!
    Jim Tomasello

  4. #4
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    Sorry, but I'm not really sure about that, as I haven't done it or tried it. I would imagine not. No use in having a tool to limit, for example, registry access, only to have an install program override those settings.

    There is a way for your application to request specific permissions. If I remember right, it's in the SecurityAction class. I have no idea if this will do anything during install.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width