tags:

views:

64

answers:

2

I have several WinForms .NET programs that are started using ClickOnce. The user logs into one application and is given a logon ID. I need to be able to get a copy of this ID from the other programs. Could anyone tell me how to do this using remoting, reflection or something! If you could point me at an example that would be great.

The code is written in C# using Visual Studio 2010, but older examples in any .NET language will do.

+2  A: 

Maybe a simple solution is to store the logon ID in the windows registry.

Here are code snippets that show you how to read and write some data in the registry. It is Easy. LINK

Jonathan
+2  A: 

It depends are all them working on the same machine or not, are there in the intranet or internet and etc ... so options will vary. If everything is working on the same PC then you can use any local storage starting from xml, .net config files to registry and even memory. If they are not on the same PC, you can use DB, so that if one client will store there ID others can select it, but all clients must have access to that DB. Other option is WCF. One of the clients can call the service method and get the ID.

So options are vary from your exact situation and requirements.

Incognito