Calls to this namespace from these methods are not permitted. - InfoPath Dev
in

InfoPath Dev

Calls to this namespace from these methods are not permitted.

Last post 10-23-2007 03:19 AM by adamrharding. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-22-2007 02:47 AM

    Calls to this namespace from these methods are not permitted.

    Can anyone help with the following error? 

    System.InvalidOperationException

    The _Startup or _Shutdown method in this form's code contains one or more calls to members of the Microsoft.Office.Interop.InfoPath.SemiTrust namespace. Calls to this namespace from these methods are not permitted.

       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)

       at Microsoft.Office.Interop.InfoPath.SemiTrust.InfoPathOMHelper.Run(String assemblyFullPathName)

     

    System.Security.SecurityException

    Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

       at System.Security.Principal.WindowsIdentity.GetCurrent()

       at Scorecard.FormCode.FormEvents_OnLoad(DocReturnEvent e)

       at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)

    Collin Vermeulen
  • 10-23-2007 03:19 AM In reply to

    Re: Calls to this namespace from these methods are not permitted.

    Hi

    Now I am no good at code but I would say the clue to the problem lies in the first statement that states the form tries to utilise semi-trust which is not allowed.

    The detail, I think, is at the bottom, saying the problem is with GetCurrent() at FormEvents_OnLoad at InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad

    I do not know how to solve it but I hoep I may have provided you with a bit of an insight.

    Fingers crossed

    Cheers

    Adam Harding
    Wales
    UK
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.