Trust a managed assembily in .NET 2.0

Posted on 2006-04-25
Last Modified: 2013-12-04

I have made a managed assembily with .Net 1.1. And I used it in a web page.

On my local machine, I have both .Net framework 1.1 and .Net framework 2.0 installed. And whenever I invoke that assembily, I got a FileIOPermission error in mscorelib.dll

I used the configuration tool in .Net Framework 1.1 to fully trust the assembily, it didn't work.
Then I uninstalled the .Net Framework 2.0, it works.

My questions is:
How to make sure my assembiliy only use .Net framework 1.1 on the client machine?
Or, an answer to the question: How to extend the trust to an assembily in .Net framework 2.0 without installing the SDK is also acceptable.

Question by:ubiwebdev
    1 Comment
    LVL 4

    Accepted Solution

    Actually, the application is supposed to use the Framework it was built on , and
    without special configuration (of course if this Framework is installed).

    below is a link from msdn how to use configuration file to enforce Framework 1.1 is used,but
    in short: create config file named name_of_your_application.exe.config (e.g. if your app is
    App.exe -> App.exe.config) that contains:
    <?xml version ="1.0"?>
        <supportedRuntime version="v1.1.4322" />

    and place it in the directory where the application resides


    Or you can use Assembly redirect, as shown here:

    Regarding trust settings, well , when both Frameworks are installed, there're 2 MMC entries in
    Start -> Administrative Tools , those are ".Net Framework 1.1 Configuration " and
    ".Net Framework 2.0 Configuration " where you can manage settings for assemblies.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
    Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    745 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

    12 Experts available now in Live!

    Get 1:1 Help Now