473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
dB

Mar 20 '06 #1
1 1121
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with...
2
by: raghavendra | last post by:
Hi, How to run automatically windows service by using setup deployment insatllation script using visual studio 2003.? What i did is :-- 1. created a windows service & tested the same. 2....
6
by: Nathan Kovac | last post by:
Yesterday afternoon I was getting the following errors in a windows service: 'DatabaseManager.DataComponent', 'Error', '3 Errors: Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
5
by: Derek Martin | last post by:
I am creating a windows service and have added a reference to a DLL project that I have created. That DLL file is correctly referenced in both a windows app and a web app, all in the same...
3
by: Michael Hoehne | last post by:
Hi, I'm currently facing a problem with a mixed environment using .NET 1.1 and ..NET 2.0 web services. We have a client application (the "client", system 1) running on .NET 2.0/WinXP, calling...
1
by: Sandy | last post by:
I am defining a web service to receive data that represents an application form and that returns a message indicating if the application form has been successfully validated or not, listing any...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
25
smithj14
by: smithj14 | last post by:
I have a form that has an option group (fraReports) which holds a list of reports to print. This part works fine. I select a report name and click print and that report opens. Now I want to add a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.