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 6191835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:50:12+00:00 2026-05-24T02:50:12+00:00

Curious to know why my 2.0 .net application is being allowed to execute when

  • 0

Curious to know why my 2.0 .net application is being allowed to execute when I have restricted the permissions assigned to the assembly.

I’ve created a new Code Group at the Enterprise level which will match for any assembly with a particular digital signature. The code group has been set so that only permissions from the associated permission set will be used and also that lower policy levels will not be evaluated.

Running the .Net 2.0 PermCalc states that my application needs the following permissions:

  • UnmanagedCode,
  • Environment
  • FileIO
  • Registry
  • Reflection

I’ve assigned to my custom code group the permission for unmanaged code but nothing else.

The first method in my application demands all of the above permissions upfront so I can display a sensible message to the user before exiting.

Running the .NET 2.0 Configuation “Evaluate Assembly” tool on my assembly indeed shows that my application will only be given the UnmanagedCode permission.

However when I execute my application is runs and completes, quite obviously doing various FileIO and Registry operations.

My app is signed with the digital signature that should match the restricted code group.

Can anyone explain why this works.

Note: My ultimate aim is to make sure that my application does not crash horribly if executed from a network share. I would have liked to check the assembly evidence zone is My_Computer but I can no longer do that with .NET 3.5 SP1. See FullTrust On the LocalIntranet

Thanks in advance for any help/suggestions.

  • 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-24T02:50:14+00:00Added an answer on May 24, 2026 at 2:50 am

    If you have configured your CAS policy correctly, then chances are that your application isn’t being denied the permissions you expect because it is not being run under the CLR whose policy you configured. Do you perhaps have 32-bit and 64-bit CLRs installed on the same machine?

    Another possibility might be that your “early check” demand is in the wrong place. Is it directly in your application’s Main method? If so, when the demand runs, there won’t be any of your application code on the call stack that is verified. If this is the problem, simply moving the demand into another method invoked from Main should allow the demand to fail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just curious to know about this.When i heard about Spring.net and tried some
I am really curious to know how the Expando Object in .Net 4.0 has
I am curious to know why this is happening. Please read the code example
I have an application written in MVC that uses your regular .Net Forms Authentication.
I have an ASP.net 1.1 application. In a sub-folder, I've installed blogengine.net, which is
I have been trying to optimize an ASP.NET C# application for a few days
Possible Duplicate: .Net Process.Start default directory? I have a C# application, mono to be
I'm curious to know the spread level of programs coded in VB.net. I'm asking,
I'm just curious.. When I call Distinct<>() (from Linq) on HashSet, does .NET know,
I have been a .net developer for the past three yrs. Just curious to

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.