Solved

Call a dll function build with delphi from asp .net

Posted on 2008-10-22
2
341 Views
Last Modified: 2013-11-23
Hello.

I´m migrating a software build with delphi 7 to .net winforms and asp.

There are some cryptography and authentication issues that is really hard to port from delphi to .net so I decided to build a dll with some "service" functions.

The dll functions basically connect to a sql db using ado, retrieve and write some data (tadodataset, tadocommand).

To see if the dll is fully functional, I made a simple winform with some textboxes and buttons and call all those functions. All the functions are ok.

But when I use the same dll functions into an asp solution they doesnt work.

There are no error messages but the functions always return that an exception was catch by a Try-Except block.

Finally... the questions:
- is it possible to call this kind of dll function inside an asp project?
- why the functions are ok with the win application and fails with asp?

Thanks.
0
Comment
Question by:eduardopxavier
2 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 22784485
asp.net normally run under aspnet use account which have very restricted access security wise where as the windows application runs under the user account who is currently logged in
you can overcome this by using impersonation following sample from Microsoft shows you how to do that
http://support.microsoft.com/kb/306158

also what exception you are getting will also be helpful
0
 

Author Closing Comment

by:eduardopxavier
ID: 31508957
ragi0017,

the functions started to work using impersonation with my user account (the same that runs the windows test).

Thanks.

Eduardo
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now