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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:34:52+00:00 2026-05-10T18:34:52+00:00

I have an application that behaves oddly, and just to verify, I’d like to

  • 0

I have an application that behaves oddly, and just to verify, I’d like to see which security zone it is currently running under.

I’ve found the System.Security.SecurityZone enum, but can’t seem to find anything that will return which of these I’m running under.

Does anyone have any tips?

Basically I want to find out if my application is running in MyComputer, Intranet, Internet, Untrusted, Trusted, etc.


Edit: Here’s the minor test-app I wrote to find this code, thanks to @blowdart.

using System; using System.Reflection;  namespace zone_check {     class Program     {         static void Main(string[] args)         {             Console.WriteLine('.NET version: ' + Environment.Version);             foreach (Object ev in Assembly.GetExecutingAssembly().Evidence)             {                 if (ev is System.Security.Policy.Zone)                 {                     System.Security.Policy.Zone zone = (System.Security.Policy.Zone)ev;                     Console.WriteLine('Security zone: ' + zone.SecurityZone);                     break;                 }             }         }     } } 
  • 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. 2026-05-10T18:34:52+00:00Added an answer on May 10, 2026 at 6:34 pm

    You need to look at the CAS evidence for the current assembly;

    this.GetType().Assembly.Evidence

    Assembly.Evidence is a property Evidence object. From this you can enumerate the evidence and look for the zone which appears as a <System.Security.Policy.Zone> element.

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

Sidebar

Related Questions

I have application that is up more than 3 days. I can see in
I have an application that goes like this F5 load balancer - IHS(a&b) -
I have an application that is successfully deploying on tomcat, which I must migrate
I have an abstract data type that behaves much like stack. It represents a
I'm programming an application in Python/Scapy that behaves like wireless 802.1X supplicant. I want
I would like to create application with ribbon interface that looks and behaves like
I have an application which behaves as a slideshow for all pictures in a
I have a web application that consists of two websites - one running on
I have a lot of configuration files that modify how my application behaves. I
I have an activity which behaves like this: A barcode scanner is called via

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.