Using a DLL in a web service - 03-20-2006 , 01:53 AM
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
Could someone help me ?
Thank you in advance.
Re: Using a DLL in a web service - 03-20-2006 , 04:50 AM
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.
|Thread Tools||Search this Thread|