473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Emulating Out-Of-Process Exe Using C#. Remoting? Singleton Design Pattern?

Hi,

I need to build a "login manager" using C#, for a desktop application.
I am new to .NET, having previously only worked in COM, so please
forgive my ignorance. What I need is a "login manager" application
that runs in the background and keeps the client's connection details
ready for any other application to request, as there will be various
applications (and various instances of the same application) all
needing access to this information. This is all to prevent the user
having to log in every time they launch a new instance of the main app
- we will assume that once they have logged in once, that's them -
they will stay logged in for the duration of their Windows session.

So, the first time the main application requires access to the
back-end database, it will call the login manager, which will ask the
user to log in. The login manager will create a session, and pass it
(or maybe just the credentials) to the main application. The main
application will use this as required, then exit. Next time the user
launches the main application, it will request the session (or
credentials) from the login manager, and since the user has already
logged in, the session will be passed from the login manager to the
main app. Hence the user won't have to log in twice.

Previously, with COM, I would have done this using an out-of-process
ActiveX Exe. But how do I do this with .NET? I think I'll have to
use Remoting and the Singleton Design Pattern, but I'm not sure where
to start. I've managed to get some remoting examples working, but
they works over HTTP, and I don't know if this will work on simple
client PCs without a web server. Also, although I can get these
examples working, I haven't managed to get them to reuse just one
instance of a class - a new instance is created every time a client
requests it.

Can anyone point me at any useful links or tutorials, or give some
advice?

Thanks in advance,

Yoni.
Nov 15 '05 #1
1 5101
Hi,

You can find lot of articles and info in Ingo Rammer's
web site...

http://www.ingorammer.com/RemotingFAQ/

Regards,
Madhu

MVP | MCSD.NET
-----Original Message-----
Hi,

I need to build a "login manager" using C#, for a desktop application. I am new to .NET, having previously only worked in COM, so pleaseforgive my ignorance. What I need is a "login manager" applicationthat runs in the background and keeps the client's connection detailsready for any other application to request, as there will be variousapplications (and various instances of the same application) allneeding access to this information. This is all to prevent the userhaving to log in every time they launch a new instance of the main app- we will assume that once they have logged in once, that's them -they will stay logged in for the duration of their Windows session.
So, the first time the main application requires access to theback-end database, it will call the login manager, which will ask theuser to log in. The login manager will create a session, and pass it(or maybe just the credentials) to the main application. The mainapplication will use this as required, then exit. Next time the userlaunches the main application, it will request the session (orcredentials) from the login manager, and since the user has alreadylogged in, the session will be passed from the login manager to themain app. Hence the user won't have to log in twice.

Previously, with COM, I would have done this using an out-of-processActiveX Exe. But how do I do this with .NET? I think I'll have touse Remoting and the Singleton Design Pattern, but I'm not sure whereto start. I've managed to get some remoting examples working, butthey works over HTTP, and I don't know if this will work on simpleclient PCs without a web server. Also, although I can get theseexamples working, I haven't managed to get them to reuse just oneinstance of a class - a new instance is created every time a clientrequests it.

Can anyone point me at any useful links or tutorials, or give someadvice?

Thanks in advance,

Yoni.
.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8618
by: FilexBB | last post by:
Hi Folks, I have tried to redirect system.out for a while and then set it back, but it can't set it back as following program snapshot ByteArrayOutputStream baos = new ByteArrayOutputStream();...
10
3701
by: Cezar | last post by:
Hello. How can simple emulating in IE this class ? ..example:hover{ border: 1px solid #696969; } Greets, Cezar.
4
36723
by: Merlin | last post by:
Hi there, I would like to check if a string is a valid zip code via Javascript. Length and existents are already checked. How can I find out if the string contains characters other than...
0
866
by: John F. | last post by:
I'm trying to figure out how to emulate a terminal with twisted conch (I want to be able to send the client information with the 'write' command in freebsd). I have played with ssshsimpleclient.py...
3
2194
by: Chris Curvey | last post by:
I can't be the first person to want to do this, but I also can't seem to find a solution. (Perhaps my Google skills are poor today.) How can I emulate cgi.FieldStorage() for my unit tests so that...
5
8367
by: Mike Carroll | last post by:
I have a COM server that's generally working ok. But one of its methods, when the IDL gets read by the Intertop layer, has parameters of type "out object". The C# compiler tells me that it...
7
1349
by: Ray | last post by:
Hello, What do you think about emulating private variables for a class this way? function Something() { var private; Something.prototype.getPrivate = function() { return private; }...
1
2079
by: jiffers | last post by:
I'm trying to figure out how to define an element in RNC so that its contents are validated if a definition matches, othewise no validation is done. The example given in the tutorial seems to...
6
14371
by: carlos123 | last post by:
Ok guys, check this out! Im getting an error "Error: Index: 0, Size: 0" not sure why. try{ // Create file FileWriter fstream = new FileWriter("database.txt"); BufferedWriter...
21
1884
by: Aaron Gray | last post by:
(Please tell me if this is silly or I am barking up the wrong tree) Can someone check this please on pre W3C DOM browsers :- function getDocumentRoot() { for ( e in document.childNodes) if (...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.