Loading c++ dll in Asp.net Web App using winmd file

1

I have a c++ dll, and an idl file that was used to generate a .winmd file.

I created a C# application that consumes the .winmd file and I can successfully create an object for a class that was defined in the dll. i.e the program compiles and runs without any issues.

However, when I try and use the same exact winmd file (which works when consumed by a C# application) for a C# Asp.net web app (i.e I add a reference to the winmd file and I see that the winmd file and dll are copied into my web apps bin folder), I get a runtime exception saying:

"Could not find Windows Runtime type [Name of class]"

When I use Fusion Logs to see what went wrong when the application was attempting to load the dll, I see this:

END : Typename or Namespace was not found in metadata file. (Exception from HRESULT: 0x8000000F)

So my question is, what is the main difference between loading a native dll in a C# application vs an Asp.Net application?

c#
asp.net
.net
asked on Stack Overflow Oct 26, 2016 by KPERI

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0