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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:06:20+00:00 2026-06-13T17:06:20+00:00

We have a worker role in Azure which uses Process.Start to kick off a

  • 0

We have a worker role in Azure which uses Process.Start to kick off a background process (which hosts a native application we need to run)

FxCop gives me a whole load of CA2122 errors due to a link demand. When I tried to add this attribute:

[PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]

I then started to get CA2135 instead, the solution to which seems to be to add the SecurityCritical attribute instead.

But then I get the CA2122 again.

Are either of these things an issue? Under what circumstances could they be and how can I be sure that I’m not introducing a security problem?

  • 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-06-13T17:06:21+00:00Added an answer on June 13, 2026 at 5:06 pm

    SecurityCritical should perform an equivalent role as a LinkDemand for full trust:

    The SecurityCriticalAttribute is equivalent to a link demand for full
    trust. A type or member marked with the SecurityCriticalAttribute can
    be called only by fully trusted code; it does not have to demand
    specific permissions. It cannot be called by partially trusted code.

    Ergo, I’d suggest adding SecurityCritical (to fulfil the needs for CA2135) and suppress the CA2122, which is presumably just Microsoft forgetting to account for their newer solution in their code analysis.

    The objective of CA2122 is to ensure that the method…

    no longer provides unsecured access to the link demand-protected
    member.

    This isn’t the case once SecurityCritical is added (which ensures the member can be called only by fully trusted code), so the second CA2122 is a false positive.

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

Sidebar

Related Questions

I have .Net Worker role (Azure) and my application write to local log files
I have an azure worker role which I have configured to use a log4net
In my solution,I have one Azure worker role project and a class library(which deals
I have an Azure worker role whose job is to periodically run some code
I have a service hosted in a Worker Role in Azure. Clients connect over
I already have a hosted service deployment which has 2 worker role instances, I
I have deployed a Worker Role to an Azure instance with remote access enabled.
I would like to run a WebSocket server off a worker role in Azure.
I have a class library shared between an Azure Worker Role and a ASP.NET
I have a Worker Role which isn´t working on Cloud environment. When I run

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.