views:

67

answers:

1

Very simple problem. I have a Delphi application and I want to restrict access to this by requiring users to log on using CardSpace. Basically, I need to extract the ID, name and address information from the cardspace card.

The use of CardSpace is a requirement from a customer and I just want to know if:

  1. Can CardSpace be easily used from Delphi?
  2. Is there already a Delphi component for CardSpace?

The biggest problem? The application needs to be a WIN32 application, although CardSpace is .NET based.

+1  A: 

To answer your questions directly:

  • No. I don't think it will be easy, but definitly doable.
  • No. There is no pre-build component for Delphi in Win32

Although CardSpace is native .Net, as long as you can run the framework on either the client or the server you can always just wrap the CardSpace library into a DLL using interop which you can then reference in Delphi. This StackOverflow question may be able to get you started.

Considering the machines will be running Windows it will most likely already have Framework 3.0 installed, which is the requirement for using CardSpace.

SharpSTS may be usefull in this environment as it already contains the bulk of the code you need to talk to the CardSpace service.

I am not a Deplhi Developer. Looking at this problem from the .Net side and doing some basic Google searches brought me to the a possible answer. I cannot gaurentee any of this will work for Cardspace, however it has worked for other technologies in our environment which is still prodimanatly Delphi. For example the interoperatibility parts.

Diago
Yeah, basically it's the solution I was hoping to avoid. Have done plenty of .NET-to-WIN32 communications and it's never really fun. There are several alternatives to do that, but it's difficult to explain to the lesser-technical colleagues of mine. Which is why I'm hoping for a simpler solution. Good answer, btw.
Workshop Alex