Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Using a DLL in a web service

Thread Tools

Using a DLL in a web service
Posts: n/a
Hi guys,
I'm trying to use a DLL of third part using P/Invoke in a web service.
I've always an exception: access denied.

The DLL is in the bin directory of the project.
I'm using VS .NET 2003, WSE 2.0 and .NET Framework 1.1. I'm trying the
code using the address http://loalhost/webservice and the test link.

I've tried the same code with a Windows Forms program without any
problem !

Could someone help me ?

Thank you in advance.
Best regards

Reply With Quote
Josh Twist
Posts: n/a
The problem will be permissions - when you're a running a windows form
project the application is running with the permissions of the current
logged in user (often an admin if they're a developer).

However, when the application is a web application it is running as the
ASPNET user account which has much fewer permissions.

Your code will need access to the UnmanagedCode permission. These
articles and the links under 'Further Reading' should help.

Naturally, be careful not to give away permissions too freely. Keep
things as locked down as you possible can.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
How to determine if a DLL is a COM DLL or .NET DLL Anushi ASP .Net 5 10-28-2004 01:59 PM
Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)? H. Simpson Ruby 4 08-03-2004 04:45 PM
mprapi.dll --> samlib.dll --> ntdll.dll issue. Some1 Computer Support 4 04-05-2004 02:02 AM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM