Problem in Unmanaged dll

N

nIgHtCrAwLeR

Hi,

I have a managed dll which is a wrapper for an unmanaged dll. I add a
reference for managed dll in C# simple application ( A form with just
a button. Managed dll gets called on button click). All this is
working in the application exactly as I want it to.

I also wanted to implement in ASP.Net using C# as its language. Now if
I take the same managed code dll and the unmanaged dll and add
reference for managed dll (exactly as above) the managed dll code gets
called, but an exception is thrown immediately when managed dll calls
a function or declare a class object of unmanaged dll. What exactly
is going wrong ?

The managed dll has DelayLoad enabled for the unmanaged dll.
(According to this article http://blogs.msdn.com/jorman/archive/2007/08/31/loading-c-assemblies-in-asp-net.aspx)


PS: I don't know if this is the correct group to post my query.
 
P

Pavel Minaev

Hi,

I have a managed dll which is a wrapper for an unmanaged dll. I add a
reference for managed dll in C# simple application ( A form with just
a button. Managed dll gets called on button click). All this is
working in the application exactly as I want it to.

I also wanted to implement in ASP.Net using C# as its language. Now if
I take the same managed code dll and the unmanaged dll and add
reference for managed dll (exactly as above) the managed dll code gets
called, but an exception is thrown immediately when managed dll calls
a function or declare a class object  of unmanaged dll. What exactly
is going wrong ?

Most likely, your Web application simply doesn't have the permission
to call unsafe (in particular, unmanaged) code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top