Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

reflection

Method ‘XYZ’ cannot be reflected

August 30, 2022 by Magenaut

We have consumed a third party web service and are trying to invoke it from an ASP.NET web application.
However when I instantiate the web service the following System.InvalidOperationException exception is thrown:

Categories ASP.NET, Q&A Tags asp.net, exception, reflection, web-services Leave a comment

How can I get the assembly last modified date?

August 30, 2022 by Magenaut

I want to render (for internal debugging/info) the last modified date of an assembly, so I’ll know when a certain website was deployed.

Categories ASP.NET, Q&A Tags .net, asp.net, file-properties, modified-date, reflection Leave a comment

How to dynamically get a property by name from a C# ExpandoObject?

August 30, 2022 by Magenaut

I have an ExpandoObject and want to make a getter for it that will return a property by name at runtime, where the name is specified in a string instead of hardcoded.

Categories ASP.NET, Q&A Tags asp.net, c#, dynamic, oop, reflection Leave a comment

EntityFramework Get object by ID?

August 29, 2022 by Magenaut

Is it possible with Generics to get an object from my EntityFramework without knowing the type?

Categories ASP.NET, Q&A Tags asp.net, c#, entity-framework, linq, reflection Leave a comment

Use reflection to get the value of a property by name in a class instance

August 28, 2022 by Magenaut

Lets say I have

Categories ASP.NET, Q&A Tags asp.net, c#, reflection Leave a comment

Compiling code at runtime, loading into current appdomain but Type.GetType cant see it

August 28, 2022 by Magenaut

Im compiling some code at runtime then loading the assembly into the current appdomain, however when i then try to do Type.GetType it cant find the type…

Categories ASP.NET, Q&A Tags .net, asp.net, c#, compiler-construction, reflection Leave a comment

Is there an easy way to convert object properties to a dictionary

August 27, 2022 by Magenaut

I have a database object (a row), that has lots of properties (columns) that map to form fields (asp:textbox, asp:dropdownlist etc). I would like to transform this object and properties into a dictionary map to make it easier to iterate.

Categories ASP.NET, Q&A Tags asp.net, c#, dictionary, reflection Leave a comment

StackTrace filename unknown

August 27, 2022 by Magenaut

Something strange is happening in my code where I’m using a StackTrace. It’s almost as if the debug info is not being loaded… but I’m running this on the DEBUG build.The .pdb files are definitelly in the bin directory and up to date. I’ve seriously ran out of ideeas :

Categories ASP.NET, Q&A Tags asp.net, c#, reflection, stack-trace Leave a comment

What risk does Reflection pose? (Medium Trust)

August 26, 2022 by Magenaut

The lack of reflection in Medium Trust hosting environments seems to cause a lot of problems for many popular web applications.

Categories ASP.NET, Q&A Tags asp.net, hosting, medium-trust, reflection, security Leave a comment

ASP.NET MVC: How to find Controllers with [Authorize] attributes using Reflection in C#? (or How to build Dynamic Site.Master Menus?)

August 26, 2022 by Magenaut

Maybe I should back-up and widen the scope before diving into the title question…

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, authorize-attribute, c#, reflection Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress