468,315 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,315 developers. It's quick & easy.

Using a DLL in a web service

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

Mar 20 '06 #1
1 977
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.


Mar 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by raghavendra | last post: by
6 posts views Thread by Nathan Kovac | last post: by
14 posts views Thread by pmud | last post: by
5 posts views Thread by Derek Martin | last post: by
3 posts views Thread by Michael Hoehne | last post: by
3 posts views Thread by =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.