[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Connecting to a .Net Remoting Server from a C++ DLL

John Hann

8/20/2004 6:07:00 PM

Hi,
I would like to integrate IAS with a .NET Remoting Server
via an IAS extension DLL written in C. Ideally, I would be
able to simply configure IAS to call a local C# dll to
handle RADIUS requests and invoke the remote .NET object
from C#, but I'm not sure how/if I can do this.

Another alternative I've considered is to communicate to
the .NET remoting server directly from the C dll. It would
probably be easier to do if the interface to the server
were an XML Web Service (since I would only have to send
and receive XML), but I would really like to connect to
a .NET Remoting through a binary formatter for performance
reasons. Has anyone here tried to utilize remote .NET
components with an old school WINAPI C dll?

Thanks In Advance,
John
2 Answers

CheeseToast

8/21/2004 3:55:00 AM

0

Hi John -

Can you do COM? Or wrap the DLL in .Net (see PlatformInvoke)?

- Cheese

"John Hann" wrote:

> Hi,
> I would like to integrate IAS with a .NET Remoting Server
> via an IAS extension DLL written in C. Ideally, I would be
> able to simply configure IAS to call a local C# dll to
> handle RADIUS requests and invoke the remote .NET object
> from C#, but I'm not sure how/if I can do this.
>
> Another alternative I've considered is to communicate to
> the .NET remoting server directly from the C dll. It would
> probably be easier to do if the interface to the server
> were an XML Web Service (since I would only have to send
> and receive XML), but I would really like to connect to
> a .NET Remoting through a binary formatter for performance
> reasons. Has anyone here tried to utilize remote .NET
> components with an old school WINAPI C dll?
>
> Thanks In Advance,
> John
>

John Hann

8/21/2004 4:47:00 AM

0

CheeseToast wrote:
> Hi John -
>
> Can you do COM? Or wrap the DLL in .Net (see PlatformInvoke)?
>
> - Cheese
>

Cheese,
I don't think I can wrap the DLL in either COM or .NET, because,
according to a post I saw from an MS employee (see link below), IAS
loads Extension and Authorization DLLs with LoadLibrary() call, which
only supports old school WINAPI C DLLs. PlatformInvoke only supports
calling Win32 API functions from C#, and I'm not aware of any technique
to to the opposite.

One might be to open up a named pipe or socket to a .Net Remoting server
and call the authorization and accounting functions through that.
However, under my current, relatively limited understanding of remoting,
it looks like objects hosted on a remoting server need a .Net client to
invoke them if you're using the BinaryFormatter to serialize your data.
Maybe I could do this if I wrote my own formatting sink, but that is
cost-prohibitive. I can't afford to do XML serialization in this
well-trodden component, so I'll probably just connect directly to our
authentication database with C++/ADO to perform the RADIUS authorization
and accounting. I'd much rather do this through .Net, but I don't think
I have many options here.
- John

The Post: http://tinyurl...