Security Exception

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zdrakec

    #1

    Security Exception

    Hello all:

    I have an application that shells out to another app (to run
    asynchronously) , but I am receiving the following error at the time I
    call the second app:

    "Request for the permission of type
    System.Security .Permissions.Se curityPermissio n, mscorlib,
    Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= <<value>>"

    I have tried a couple of things, with no success, and I am able to run
    the app in question from the VS IDE (it's part of the same solution).
    But when I call it from the other application, it fails as above.

    My perusal of the documentation has left me, if anything, more puzzled
    that when I started.

    I would greatly appreciate being pointed in the right direction!

    Cheers,
    zdrakec

  • Chris

    #2
    Re: Security Exception

    zdrakec wrote:[color=blue]
    > Hello all:
    >
    > I have an application that shells out to another app (to run
    > asynchronously) , but I am receiving the following error at the time I
    > call the second app:
    >
    > "Request for the permission of type
    > System.Security .Permissions.Se curityPermissio n, mscorlib,
    > Version=1.0.500 0.0, Culture=neutral , PublicKeyToken= <<value>>"
    >
    > I have tried a couple of things, with no success, and I am able to run
    > the app in question from the VS IDE (it's part of the same solution).
    > But when I call it from the other application, it fails as above.
    >
    > My perusal of the documentation has left me, if anything, more puzzled
    > that when I started.
    >
    > I would greatly appreciate being pointed in the right direction!
    >
    > Cheers,
    > zdrakec
    >[/color]

    Are you callling an app on a remote drive. Try to fully trust the
    application in .net security wizard.

    Chris

    Comment

    • marcmc

      #3
      Re: Security Exception

      zdrakec

      Here is what you need to do.

      When you are running a .net Application from a network drive it requires a
      secrity policy setting. You need to open notepad, copy thses commands into it.

      C:
      CD\
      CD C:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\
      CLS
      caspol -machine -chggroup LocalIntranet_Z one FullTrust

      save it as .bat (batch file - this way you can ship as part of your
      application deployment stratgey).

      Then log into each users machine as administrator and execute the batch
      file. It will ask you do you want to change the security policy, say yes.
      Have the user log in again and away you go.



      Comment

      • zdrakec

        #4
        Re: Security Exception

        Hello marc, Chris:

        When I execute the above, my system does not recognize "caspol" - is it
        hiding somewhere in my directory path?

        Thanks much,
        zdrakec

        Comment

        • zdrakec

          #5
          Re: Security Exception

          Well, never mind that, I'm an idiot, the .NET framework directory is in
          my Windows, not WinNT, folder :)

          Batch file ran okay, now we'll see if that fixed the problem.

          Cheers,
          zdrakec

          Comment

          • zdrakec

            #6
            Re: Security Exception

            Thou be the man, marc...that did indeed resolve the issue! Thank you
            sir!!!

            zdrakec

            Comment

            • marcmc

              #7
              Re: Security Exception

              No worries zdrakec.
              I was just talking to a network security guy here and basically it means
              that as a hacker you must penetrate the machine that you have used caspol to
              free up managed code. In other words if you have sensitive info within your
              managed code, then it will be open should this machine get attacked. Be
              careful with fullTrust when using an enterprise wide application. I have six
              users and have been recommended I lock this down more. I think there seven
              levels of trust so I am going to build up from LowTrust upward until I find a
              more adequate solution.

              Marc


              "zdrakec" wrote:
              [color=blue]
              > Thou be the man, marc...that did indeed resolve the issue! Thank you
              > sir!!!
              >
              > zdrakec
              >
              >[/color]

              Comment

              Working...