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

  • Home
  • SEARCH
  • 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 276333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:54:16+00:00 2026-05-12T00:54:16+00:00

I must say that so far, I’ve probably just been darn lucky in that

  • 0

I must say that so far, I’ve probably just been darn lucky in that I’ve never come across the problems associated with a web site running in medium trust. I’ve only ever developed intranet apps or happened to have use a hosting company that runs in full trust. But the host I’ve been asked to use for a recent project runs at medium trust so I’m trying to get my app running this. Couple of questions – I develop on Windows XP. Can IIS on there be configured for medium trust (easier to debug) and/or is it a web.config setting? There is a wealth of information on this subject and the learning curve is steep.

Secondly, after a lot of fiddling and removing code, I think this line is causing a permissions error:

For Each FieldInfo As FieldInfo In Type.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public)

Can anyone clarify this is a possible candidate, esp. that NonPublic flag? This is copy & pasted code (Coding Horror highlighted the risk of this) so I’ve never really thought about. I assume the loop is through each field in the object both public and non-public fields – and I’ve read that protected fields are forbidden with reflection on medium trust.

Cheers, Rob.

  • 1 1 Answer
  • 1 View
  • 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-12T00:54:17+00:00Added an answer on May 12, 2026 at 12:54 am

    Sorry, Reflection with NonPublic is equivalent to full trust.

    If somehow I didn’t have full trust but had NonPublic reflection, I could leverage that into changing my own code trust level (writable strings, etc).

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

Sidebar

Related Questions

Disclaimer: I'm very new to Django. I must say that so far I really
So, I must say that I am completely new to symfony, i've been using
First I must say that I'm not good at English and completely new to
Firstly, I must say that the version of Lucene.NET we are using is not
Why does MISRA 14.5 say that the continue statement must not be used?
Well, I must say , I am lost with a feeling that the operation
Suppose I have a method that must return an object (say from a database
Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled
Before I start I must say that I maybe biting more than I can
I must say I feel like an idiot right now. :) I've been up

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.