Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6081857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:13:23+00:00 2026-05-23T11:13:23+00:00

I have a dll which accesses the scanner on the local machine from an

  • 0

I have a dll which accesses the scanner on the local machine from an intranet web application written in asp.net. The dll is given full trust on the local machine using caspol. Everything worked fine on Win XP, but not on Win 7.

The code is:

            PermissionSet ps = new PermissionSet(PermissionState.Unrestricted);
        ps.AddPermission(new SecurityPermission(SecurityPermissionFlag.AllFlags));
        ps.Assert();


wiaDevMgr = new DeviceManager();
            foreach (DeviceInfo di in wiaDevMgr.DeviceInfos) {

The request for DeviceInfos throws the following error:

Exception: Acquire from WIA failed Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I’ve checked the actual permissions using caspol – the entry for the relevant zone is:

   1.2.  Zone - Intranet: FullTrust
  1.2.1.  All code: Same site Web
  1.2.2.  All code: Same directory FileIO - 'Read, PathDiscovery'
  1.2.3.  Url - http://srvr/tpc/pictureConverter.dll: FullTrust
  1.2.4.  Url - http://srvr/tpc/printUniformities.dll: FullTrust
  1.2.5.  Url - http://srvr/tpc/WiaOneScan.dll: FullTrust
  1.2.6.  Url - http://srvr/tpc/DocPrint.dll: FullTrust
  1.2.7.  Url - http://srvr/tpc/FileAdmin.dll: FullTrust
  1.2.8.  Url - http://srvr/tpc/Interop.ImageMagickObject.dll: FullTrust
  1.2.9.  Url - http://srvr/tpc/Interop.WIALib.dll: FullTrust

Where the relevant dll is WiaOneScan.dll

Thanks for any ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:13:24+00:00Added an answer on May 23, 2026 at 11:13 am

    Finally solved it. Used PermCalc.exe to get a list of the permissions required by the dll.

    
                PermissionSet ps = new PermissionSet(PermissionState.Unrestricted);
                ReflectionPermission rp = new ReflectionPermission(PermissionState.Unrestricted);
                rp.Flags = ReflectionPermissionFlag.AllFlags;
                ps.AddPermission(rp);
    
                SecurityPermission sp = new SecurityPermission(PermissionState.Unrestricted);
                sp.Flags = SecurityPermissionFlag.AllFlags;
                ps.AddPermission(sp);
    
                KeyContainerPermission kc = new KeyContainerPermission(KeyContainerPermissionFlags.AllFlags);
                ps.AddPermission(kc);
                ps.Assert();
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET dll which needs to read it's config settings from it's
I have a DLL which provides an entry point to an ASP.MVC application. Let's
I have a dll which comes from a third party, which was written in
I have a .NET assembly which I am accessing from VBScript (classic ASP) via
i have a .net dll which is written in c sharp, which uses linq
I'm working on an application so i have write an dll which contain a
I have a dll which is based on .net 3.5 -- it uses internally
I have a DLL which is written in native C++. The Visual Studio project
I have a dll which includes a function called ReadPort that reads data from
Suppose this situation : I have a dll which was written in standard c++,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.