hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

System.Security.SecurityException was unhandled - Message: That assembly does not allow partially trusted callers.

Last post 03-26-2008, 10:01 by moekkel. 2 replies.
Sort Posts: Previous Next
  •  03-26-2008, 8:07 5535

    System.Security.SecurityException was unhandled - Message: That assembly does not allow partially trusted callers.

    I installed the VSShell and the latest F#. Trying to run the sample app causes a security exception.

    H:\My Documents\dev\Projects\Fs1\Fs1>.\fs1.exe

    Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers.
       at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet...
       at <StartupCode$fs1>.File1._main()
    The action that failed was:
    LinkDemand
    The assembly or AppDomain that failed was:
    fs1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    The method that caused the failure was:
    Int32 index(System.String, Char)
    The Zone of the assembly that failed was:
    Internet
    The Url of the assembly that failed was:
    file:///H:/My Documents/dev/Projects/Fs1/Fs1/fs1.ex



    Using C# and Visual Studio Express 2008 works fine.

    So is there some security configurations I need to change?


  •  03-26-2008, 8:48 5536 in reply to 5535

    Re: System.Security.SecurityException was unhandled - Message: That assembly does not allow partially trusted callers.

    The problem is the fact your using it from a network drive. In the .NET framework network drives have a lower set of privileges than the local disk, somethings will work, others won't.

    You can configure your security settings using caspol:
    http://msdn2.microsoft.com/en-us/library/cb6t8dtz(SQL.80).aspx

    But I've always found it a bit of a nightmare - easier just to let it run from the localhard drive.


    Robert Pickering
    http://strangelights.com
  •  03-26-2008, 10:01 5538 in reply to 5536

    Re: System.Security.SecurityException was unhandled - Message: That assembly does not allow partially trusted callers.

    Aha!

    Thanks very much for that info, it works fine now!

    BTW, is there a way of seeing the console output inside Visual Studio?

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems