SubSonic Forums
All Your Database Are Belong To Us

WPF/SubSonic Deployment

Latest post 10-20-2008 3:52 PM by spookytooth. 4 replies.
  • 10-13-2008 5:59 PM

    WPF/SubSonic Deployment

    Hi All,

    I am having problems in a live environment using SubSonic 2.1 in a WPF browser application (xbap).

    On my dev machine, everything works 100% with zero problems.
    After I publish, the xbap loads, then as soon as SubSonic kicks in with the first query, I get

    "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
       at SubSonic.DataService.LoadProviders()
       at SubSonic.DataService.GetInstance(String providerName)
       at Smartec.SmartLog.DAL.Status.GetTableSchema()
       at Smartec.SmartLog.DAL.Status..ctor()
    The action that failed was:
    LinkDemand
    The type of the first permission that failed was:
    System.Web.AspNetHostingPermission
    The first permission that failed was:
    <IPermission class="System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    version="1"
    Level="Minimal"/>"

    Does anyone know what to set etc...? to get this to work correctly over the internet?

    TIA

  • 10-14-2008 2:14 PM In reply to

    Re: WPF/SubSonic Deployment

    Reply |Contact |Answer

     This is a medium trust violation - who's your ISP and are you using the Build Provider?

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!

  • 10-14-2008 2:21 PM In reply to

    Re: WPF/SubSonic Deployment

     It is a dedicated machine on a clients permises.

    Figured out that I had to deploy the WPF with Full Trust settings and had to export a certificate for it which the clients install on their machines. All works well from there...

  • 10-20-2008 8:08 AM In reply to

    Re: WPF/SubSonic Deployment

    Okay, I am back at this one again.

    While I have it all working great now after loading a certificate on the client machine (to get full trust), I don't actually want to do this.
    I want my WPF Application to run in medium trust so that the client can simply access the xbap with no client side setup to do. SubSonic is however preventing this as it requires a full trust environment in an xbap.

    Any ideas how to get SS loaded and running in a medium trust xbap?

  • 10-20-2008 3:52 PM In reply to

    Re: WPF/SubSonic Deployment

     try setting enableTrace=false (i added this to the other thread as well)

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!

Page 1 of 1 (5 items) | RSS