Always a InvalidOperationException-Error

Posted by: erto on 8 September 2017, 12:32 pm EST

  • Posted 8 September 2017, 12:32 pm EST

    Hello Farpoint-Team,

    i try the Trialversion of Spread for WinForms v2.5. But always if i try to start a new project and place the Spread-control on a form and start my project, i'll get a "InvalidOperationException was unhandled"-Error, "The error : The assembly does not allow partially trusted callers" (there is no code in my project!) and my project doesn't work!!!?

    ----------------- the complete error-message (in german language):

    System.InvalidOperationException wurde nicht behandelt.
      Message="Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: Die Assembly lässt keine Aufrufer zu, die nicht voll vertrauenswürdig sind.."
           bei WindowsApplication2.My.MyProject.MyForms.Create__Instance__[T](T Instance)
           bei WindowsApplication2.My.MyProject.MyForms.get_Form1()
           bei WindowsApplication2.My.MyApplication.OnCreateMainForm()
           bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           bei WindowsApplication2.My.MyApplication.Main(String[] Args)
           bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
           bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           bei System.Threading.ExecutionContext.runTryCode(Object userData)
           bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
           bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Threading.ThreadHelper.ThreadStart()


    Strangely is, that all the samples in Spread-Install-Dir will work!!!

    What do i wrong?

    Second Question: If we order this month the Spread 2.5, we get v3.0 for free or should we'll wait for v3.0???

    Thank you for help

  • Replied 8 September 2017, 12:32 pm EST


    1) This is a security error. It sounds like you may be running the project off a network directory. Or you do not have permissions for the directory. What Operating System are you running?

    2) You would need to purchase Spread 2.5 with Subscription in order to get the free updates of all versions within a year.

  • Replied 8 September 2017, 12:32 pm EST

    I use WindowsXP with local admin-rights. And controls from other companies (like Infragistics, DataDynamics) will work proper!

    Okay - alternatively i'll wait for the next release step (v3) and hope this next release will works on my machine. Or do you have a idea what i can try? I'm already a customer of the AX-Version of Spread (7.x) and i like so much...

    Sorry 4 my bad english and thank you for assistance.


  • Replied 8 September 2017, 12:32 pm EST

    Erto -

    What happens if you add the spread references to a new project and then create the spread control dynamically and add a sheet to it.  Can you run the project then?
  • Replied 8 September 2017, 12:32 pm EST


    Version 3 is scheduled to release in about a month. There is a beta for the product. You would need to email the Product Manager to find out about joining the beta.

    My guess is that version 3 will have the same problem. We need to find out why the product is throwing this error. Did you install the product to the default directory? What version of Visual Studio are you using?

  • Replied 8 September 2017, 12:32 pm EST


    Q: Did you install the product to the default directory?

    A: No, I didn't. It was installed to: "C:\Coding\Dnet\Controls\SpreadWinForms25"

    Q: What version of Visual Studio are you using?

    A: I use VS2005, SP1 (WinXP Pro, SP2)


  • Replied 8 September 2017, 12:32 pm EST


    Take a look at the References in your test project versus the ones in the Samples that are working fine for you to see if there is any setting on one of the assemblies that is different.

  • Replied 8 September 2017, 12:32 pm EST

    That was already my first step before i post on this board. I can't see any difference.

    But ok - I'm on vacation to until the end of this month, then i'll check it again. THX


  • Replied 8 September 2017, 12:32 pm EST

    <FONT face=Arial><FONT size=2>Hello,</FONT></FONT>

    <FONT face=Arial><FONT size=2>it also fails but with another error: "SecurityException". The error occurs already on the first code-row: <FONT color=#000000>MySpread <FONT color=#0000ff>As</FONT> <FONT color=#0000ff>New</FONT> FarPoint.Win.Spread.FpSpread</FONT></FONT></FONT>

    <FONT face=Arial size=2>I can't understand this - because all other controls will realy work without any problems...</FONT>

    <FONT face=Arial size=2>Is there a beta of v3 and when is the Release-Start of v3 for WinForms. So i'll try the v3 and hope there is not the same problem...</FONT>

    <FONT face=Arial size=2>THX!</FONT>

    <FONT size=2> 

  • Replied 8 September 2017, 12:32 pm EST

    Okay, now i'm back from the holiday!

    BUT - now has the "Trial period be expired"! *lol*

    So i can't test anything more.

    Now I'll set all my hope to version3 !!!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels