Assembly does not allow partially trusted callers

Posted on 2008-11-19
Last Modified: 2012-06-22
I keep getting this error and no luck fixing:

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

Source Error:

Line 1:  <%@ Page Language="VB" ContentType="text/html" %>
Line 2:  <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=,publicKeyToken=836f606ede05d46a,culture=neutral" %>
Line 3:  <MM:DataSet
Line 4:  runat="Server"
Line 5:  id="Procedure1"
Question by:N R
    LVL 7

    Expert Comment

    Use the Microsoft .NET Framework configurator to give the assembly that tries to use that locked down assembly full trust.

    If that doesn't help: create a WCF wrapper around that assembly and let it run in a Windows Service. Consume the WCF wrapper from the pages.

    Kind regards.
    LVL 7

    Expert Comment

    BTW: the page will get compiled to a DLL (class assembly) and is placed in the bin folder. Ditch the dynamic recompile and add a strong name for your assembly. This will easy up the rights management you are battling with.
    LVL 11

    Author Comment

    by:N R
    I'm very new to this and not sure what you mean.  I know I can't mess with the .net config as I'm hosted through
    LVL 7

    Accepted Solution

    Phew this seems a common problem. Mostly solved by moving to another provider that can activate the full trust for you...

    If this isn't an option you can try the modified controls found here:
    (extract the mxp file using the adobe extension manager)

    Or you can take a look in the code that should be on this location or similar:
    C:\Program Files\Macromedia\Dreamweaver 8\Configuration\ServerBehaviors\Shared\ASP.Net\Scripts\Source\DreamweaverCtrls.cs
    (info found on:
    In the code file you will have to find the System.Security stuff with RequestPermition and .Deny and .Demand and so.

    A last resort would be: don't use those controls. (very disappointing answer - i know)

    Kind regards.
    LVL 11

    Author Comment

    by:N R
    Yeah tried that and still not working.  I don't know how to do it without the controls.  Been working on it for a week now.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now