Solved

Call a dll function build with delphi from asp .net

Posted on 2008-10-22
2
340 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

746 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

10 Experts available now in Live!

Get 1:1 Help Now