locked
System.Security.SecurityException' occurred in System.Data.Entity.dll from WPF calling System.Data.Objects.ObjectContext(string,string) constructor RRS feed

  • Question

  • Hi to all, I try to develop a WPF project with linq to entities binding; I add to it the entity data model reversed from database MySql with MySQL Connector 6.0.2 released some weeks ago. When I call from public Page1() of WPF the constructor of model it recalls base constructor System.Data.Objects.ObjectContext(string,string) and it caughts the following exception with italian message:
    Impossibile creare un'istanza di 'Page1' definita nell'assembly 'WPFBrowser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Eccezione generata dalla destinazione di una chiamata.  Errore nel file di markup 'Page1.xaml', riga 1, posizione 7.
    In output from Visual Studio I see that it doesn't correspond to real exception that is following:
    A first chance exception of type 'System.Security.SecurityException' occurred in System.Data.Entity.dll

    Some suggest to solve the problem?
    Is it possible actually with Fx3.5SP1 do a data binding with linq to entities for a WPF control?
    Cheers,
    Raffaele.



    Raffaele
    Thursday, April 16, 2009 1:51 PM

All replies

  • Any ideas for working with ADO .NET 3.5 (mysql connecotr) with WPF?

    Very thanks.

    Raffaele
    Tuesday, April 21, 2009 9:32 PM
  • I have exactly the same issue. I tried to add a business layer between my WPF and EF Class library. That didn't work either. EF works with Windows Forms: CRUD operations are executed by the book. I reckon the issue is in security preferences: WPF application must be fully trusted (IE settings wise). I am unable to find any information on how to implement it though.

    • Edited by Arkady D M Thursday, October 4, 2012 10:58 AM
    Thursday, October 4, 2012 10:57 AM