[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework

SingleInstanceApplication gets SocketException on Vista with .NET

Josh

4/25/2008 9:27:00 PM

I have a single instance C# application I wrote in VS2005. When I update that
to VS2008, I get a SocketException in the first instance, when the second
tries to run.

I made a very simple test using VB. In VS2005, make a VB win app. In the
project properties, check the "Make single instance application" box. Run the
app in the debugger. Launch a second instance from File Explorer. It will,
correctly, startup briefly then close. The first instance will bring itself
to the forefront. This is good.

When I convert the app to VS2008 and run the app in the debugger, launch a
second instance, the first instance will get a First Chance SockedException
then an IOException (wrapping the SocketEx) in the debug output window.

The exception is handled, but I'm wondering if I need to be doing some
different setup or permissions something.

I'm running this on Vista. I get the exception running normally, running as
administrator and running with UAC off.
When I do this test on XP, I do not get this exception.

Is this something I need to be concerned about in my code?
Is this a bug with the framework/Vista that needs to be reported?

Thanks,