By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,465 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

Using a DLL in a web service

P: 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
dB

Mar 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: 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.

http://msdn.microsoft.com/library/de...tytutorial.asp
http://blogs.msdn.com/shawnfa/archiv.../20/57023.aspx

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

Josh
http://www.thejoyofcode.com/

Mar 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.