unmanaged dll

G

Guest

I have wrapped up an unmanaged dll with the System.Runtime.InteropServices
using [DllImport], etc., and turned it to an assembly dll to be used in C#.
It has been well-tested in a Windows Form application. It works fine there.
However, when I try to call this same dll in a ASP.Net code behind
environment, it gives me the following error:

The type or namespace name 'ZZZ' could not be found (are you missing a using
directive or an assembly reference?)

I have "Add Reference" to this dll and I have checked the path and file,
access right, etc., and I cound not find any settings that are not correct.
But the error persists and the web page does not compile.

Any one knows if there is special setting I need to be aware of to add a
custom-made dll to work with an ASP.Net page?

Thanks!
Jack
 
K

Kevin Frey

Does your code source file contain a using ZZZ clause (where ZZZ is the full
namespace that the assembly resides in)?
 
G

Guest

D'oh...you're a genius. :)

I stuck for 3 days wondering why the Windows Form app runs but the ASP.Net
page doesn't. Now I know it's because the Windows Form app is under the same
namespace so it doesn't need to insert the "using..." statement.

Many Thanks.

Kevin Frey said:
Does your code source file contain a using ZZZ clause (where ZZZ is the full
namespace that the assembly resides in)?

Jack said:
I have wrapped up an unmanaged dll with the System.Runtime.InteropServices
using [DllImport], etc., and turned it to an assembly dll to be used in
C#.
It has been well-tested in a Windows Form application. It works fine
there.
However, when I try to call this same dll in a ASP.Net code behind
environment, it gives me the following error:

The type or namespace name 'ZZZ' could not be found (are you missing a
using
directive or an assembly reference?)

I have "Add Reference" to this dll and I have checked the path and file,
access right, etc., and I cound not find any settings that are not
correct.
But the error persists and the web page does not compile.

Any one knows if there is special setting I need to be aware of to add a
custom-made dll to work with an ASP.Net page?

Thanks!
Jack
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top