none
CAS not working on x64 platform? RRS feed

  • Question

  • Hello,

    I was struggling couple of hours why my CAS settings which in any possible way I couldn't have forced to work. The whole I defined was a permissions set and code group at a machine level which I associated with evidence of particular strong name.
    And this was not working, until...  I switched the target platform to x86 (I'm using Vista x64).
    Then everything magically worked! (I eventually received the desired SecurityException).

    When my application is running in normal (for me) x64 mode, the .net configuration tool correctly evaluates my permission (evaluate assembly option) showing me desired set of permissions. However this is only what is seen in the tool - it has no real effect in runtime.

    Does Anybody know how can I enable CAS for x64 assemblies ?

    Saturday, May 17, 2008 2:38 PM

Answers

  • Use the 64-bit version of Caspol.exe.  You'll find it in the c:\windows\microsoft.net\framework64 folder.
    Saturday, May 17, 2008 3:00 PM
    Moderator

All replies

  • Use the 64-bit version of Caspol.exe.  You'll find it in the c:\windows\microsoft.net\framework64 folder.
    Saturday, May 17, 2008 3:00 PM
    Moderator
  • Yes, indeed, proper version of command line tool works fine.

    So, is this graphical tool only useful for x86 PE's ?
    Monday, May 19, 2008 11:04 AM
  • I assume you mean the MMC snap-in that you access from Control Panel + Administrative Tools.  It comes with the framework SDK, there are distinct versions of the SDK for x86 vs x64.
    Monday, May 19, 2008 12:08 PM
    Moderator