Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • philw 99 posts 434 karma points
    Apr 16, 2013 @ 15:15
    philw
    0

    latest Umbraco 6.0.3, version 2.0.1 fails in medium trust

    Not sure what's going on here, crashes as below, but this is the version which should work with medium trust.

    I tried copying the whole install to a test machine, on which I do have full trust, but I could not get that copy to work properly (well I could not start the instance). I guess I will try this some more, as if the issue is a trust issue, then perhaps I can get around it this way, then I can maybe run this plugin.

    The "WebMatrix" approach didn't work, so I'm kind of stuck here.

    ----

    Security Exception

    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

    Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.

     

    ...

     

    Our.Umbraco.Dashboard.ExportSqlCE.Web.Dashboard.btnExport_Click(Object sender, EventArgs e) +0

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 16, 2013 @ 15:31
    Lee Kelleher
    0

    Hi Phil,

    Thanks for raising this.  Are you able to copy/paste any more of the exception please? (Currently it's not enough for me to go on - sorry)

    - There is a new version of the underlying "SqlCeScripting" code library, so I'll be upgrading the package to use that ... so I'll re-test for Medium Trust (against Umbraco v6.0.latest).

    Cheers, Lee.

  • philw 99 posts 434 karma points
    Apr 16, 2013 @ 18:15
    philw
    0

    Damit.. sorry, I moved on from there before posting. Sorry about that!


    As a perhaps amusing aside... 

    What I did have to do was somewhat nasty and isn't quite done yet, but it's spade-work and nearly there. The process to migrate from CE -> SQL proper was (starting with an install of about 30 pages and associated media on the CE thing.:

    1. Make a clean install of Umbraco, using standard IIS/ SQL on a test server.
    2. Manually re-create the templates etc, ftp-ing bits and bobs from the CE server install where possible.
    3. Manually copy the html for every one of the pages, one by one, from CE install to SQL install.
    4. Re-import all the media.
    5. Manually re-patch all the media links, plus menu links etc.
    6. Test site locally on test server.
    7. Backup SQL server database, restore to new Rackspace SQL Server instance. 
    8. FTP all that to the target (Rackspace Cloud) Medium Trust install, point connection string correctly.
    Job done ;-)
  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 17, 2013 @ 11:06
    Lee Kelleher
    0

    Hi Phil, quick follow up on this.

    I've upgraded the underlying SqlCeScripting library, but it seems that it doesn't support Medium Trust anymore (I'll flag an issue with the library's developer - see if there's an easy fix).  I've released a new version (v2.0.2), and marked it as Full Trust only.

    Glad that you got your website sorted.

    Cheers, Lee.

  • philw 99 posts 434 karma points
    Apr 18, 2013 @ 00:07
    philw
    0

    Thanks - I'm assumiong the script/package only works on CE, or I could try it again. Actually I will probably install another server under Medium Trust in a few weeks, I could do a quick install/ test with CE, then the migration, to see if it works, then. I will report back with full crash dump if I get a shot at that.

    Alternatively, the Rackspace medium trust precise web.config settings are published here (bottom of the page):
    http://www.rackspace.com/knowledge_center/article/modified-medium-trust-on-cloud-sites

    It may be that just running the package with one of those referenced from the site web.config will repeat the error, if you see what I mean, as they're supposed to emulate the live system's settings.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 18, 2013 @ 11:10
    Lee Kelleher
    100

    Thanks Phil.  I was able to reproduce the bug in Medium Trust - no need to send any dumps/exceptions.  It's an issue with the underlying library (beyond the control of my code/package).

    For now it would only work in a Full Trust environment.  But generally if you are exporting from SqlCe (to SQL Server), you'd be doing it on your local dev machine anyway. (Not sure why you'd be doing this on a production environment - unless you want backups? but then, why not just backup the SqlCe file itself?)

    Cheers, Lee.

  • philw 99 posts 434 karma points
    Apr 18, 2013 @ 11:51
    philw
    0

    thanks - I'll knock that one off my list!

    I think the approach I tried at the top (copy the target install to a fully-trusted test machine, then export that) should have worked, but for some reason I couldn't get that to fire up. So yes, that should work, hence there should be a work-around, I just didn't manage to get that to work.

    FWIW, the problem with the CE thing is that it doesn't work in a clustered environment - not sure how it's structured, but it looks like one big file or something and maybe it's held open for read/write, which doesn't play with Rackspace Cloud. As SQL databases are actually a rather well known quantity for us I'd rather have it in SQL so I can back it up sensibly, use multiple servers off it, and all that stuff. So my problem was just that clicking through all the install boxes leads you to a bit of a dead end (CE), hence the plug-in is a useful way out of that hole.

    Sorted now for both of us now. 

Please Sign in or register to post replies

Write your reply to:

Draft