Security Error RRS feed

  • Question

  • Hai Friends,

    I developed a windows application using and Framework 2.0). And I deployed it using the setup wizard. I installed it on D Drive of my Server machine. and on the server itself the application works properly. The D Drive of the server machine is mapped as G drive on other Machines. while I am accessing the application from other machines an error occurs as follows.


    Application attempted to perform an operation not allowed by the security policy. To Grant this application the required permission, contact your system administrator, or use the microsoft.NET Framework Configuration tool.


    That Assembly does not allow partially trusted callers.

    And I tried with the Framework Configuration Tool. But still the problem Exists.


    The Error Details are as follows

    Here The HamachiLog is my application Name.


    *******************************************************Error Details Starts from here **************************************************

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Security.SecurityException: That assembly does not allow partially trusted callers.
       at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
       at HAMACHI.HamachiMod.DbConnect()
       at HAMACHI.frmMain.frmMain_Load(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    The action that failed was:
    The Zone of the assembly that failed was:

    ************** Loaded Assemblies **************
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
        Assembly Version:
        Win32 Version:
        CodeBase: file:///G:/HamachiLog/HamachiLog.exe
        Assembly Version:
        Win32 Version: 8.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/
        Assembly Version:
        Win32 Version:
        CodeBase: file:///G:/HamachiLog/Advantage.Data.Provider.DLL
        Assembly Version:
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the section.
    The application must also be compiled with debugging

    For example:

        < jitDebugging="true" />

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.


    ***************************************************End of Error  Details **************************************************************


    Can anyone help me



    thanks in advance



    Tuesday, January 8, 2008 5:36 AM


  • From the error information, it looks like an CAS (Code Access Security) problem, please try to set corresponding security permission to "FullTrust" (In Enterprise, Machine and User scope) in .NET framework configuration.



    Thursday, January 10, 2008 3:59 AM