Skip to main content
added 2 characters in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes() Method, it throws NotSupportedExceptionNotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes() Method, it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes() Method, it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

deleted 1 character in body
Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes Method () Method, it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes Method (), it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes() Method, it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit

Source Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683

This problem originates in the .NET Framework itself, not in ASP.NET Web API.

If you look at the code for DefaultHttpControllerTypeResolver.cs line 80, you'll see that it contains the following comment:

// can't call GetExportedTypes on a dynamic assembly

Looking up Assembly.GetExportedTypes Method (), it throws NotSupportedException with the description "The assembly is a dynamic assembly."

There are several methods in Reflection that don't work on dynamic assemblies, including AppDomain.CurrentDomain.GetAssemblies() and Assembly.Load(). I suspect this is a security issue; dynamic assemblies cannot be code-signed or afforded any of the usual security protections, and should therefore not be run in full trust, if that's even possible.

Further Reading
Security Issues in Reflection Emit