Interop problems "Access is denied"

P

Peter Reid

Hi

I've created an interop dll with the following commands:

tlbimp NegociosObjects.dll /keyfile:key.snk /out:NegociosObjectsInterop.dll
gacutil -i NegociosObjectsInterop.dll

Then, in a web part, i've tried to create an object of one of the classes in
the dll:

Dim obj
obj = CreateObject("NegociosObjects.XMLInterface");

This has always worked until recently (needed to reinstall the software that
provides the above dll). Now the web part just says that there is an error.
So, I decided to create an asp.net web application and reference the dll
directly. Now i'm getting an "Access is denied" error . I've checked the
permissions on the directory and they look ok, and i've tried running as
Administrator and my own user account, but still have the same problem.

Any ideas? Thanks.
 
P

Paul Glavich [MVP - ASP.NET]

Perhaps try giving full permissions to the interop.DLL in the .Net framework
configuration tool in Start --> Programs --> Administrative tools.

It looks like you are giving the interop.dll a strong name, so in the config
tool (at the machine level) setup a full trust for any code that has a
specific public key. The config tool will allow you load a public key from a
strongly named assembly.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top