Single Instance

I have a winform app in vb.net (studio 2008) and I have defined the app as a single instance application. I need to get access to the StartupNextInstance event so this is important because when it launches for the second time I need to just take action in the running instance.  This all works fine and dandy until you publish this on a terminal server. I need for each user to have the same functionality but only within their session.. so what I need is for my appliction to be a single instance within a session application.  Is there some way to accomplish this?

SO the appliction launches and does stuff... then it gets called again (from another third party app) and depending on some paramaters passed to it if it already exists it will just change the screen (no relaunch, etc).  This works FINE - but not on a terminal server because of the single instnace flag... help.
LVL 1
NTGuru705Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
for this you can use User Credential of user running application
Thanks
0
NTGuru705Author Commented:
Not sure I follow you... can you clarify?
0
CodeCruiserCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
follow the following link and store the user name in the class object, you may use list of users, if the new user comes then allow new instance ortherwise use old object
http://www.codeproject.com/KB/cs/getusername.aspx 
0
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:

You can get the current identity of the user under which the current thread is running (not necessarily the logged in user) using WindowsIdentity.GetCurrent().  Alternatively you can get the logged in user name via the Environment.UserName property.  It is not guaranteed to be the user running the current process however.

0
NTGuru705Author Commented:
Looks like I may have mis understood.. it may actually be another issue here that I am dealing with.. it may be supported just fine in terminal session.
0
NTGuru705Author Commented:
It is supported fine on terminal server.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.