Today has been incredibly frustrating. With Bill’s help I was able to work out some of the issues I was facing yesterday with regards to using the Single Instance Application feature in the VB Application Framework. Turns out that they use a secure channel and if you attempt to use an unsecure channel (ok, I know I should have been securing it but it was a prototype!) it fails.
The next problem I encountered was that the first time you attempt to establish a connection, OneCare (my current firewall product) would prompt you to say whether it should be allowed, blocked or just blocked this time. The ironic thing was that in the meantime the app had crashed in the background.
Going back to what the VB team did in building their single instance feature I created a very simple application (ie create new project -> Windows Application (VB)). I then enabled the single instance feature and ran the application. From the bin folder I tried to run the application again and BANG there goes OneCare again:
That I could live with but a second later (before I had a chance to select an option) I noticed:
Urgh – I’m not sure whether this is a bug/feature of OneCare or the VB Application Framework but I’m so not happy! Pretty sure this is an issue with OneCare as it shouldn’t be rejecting the connecting application until the user has selected whether the accept or block the application.
Funnily enough if you select to “Block for now and ask me again later” if you try to run the application again it just crashes without the OneCare prompt. I guess this is to be expected with a v1 product!
Update: Looks like this is definitely a problem with OneCare (and perhaps other firewall products). I disabled the OneCare firewall and instead enabled the standard Windows Firewall. The Single Instance test app works fine without prompting or failing. Although it is great that OneCare protects more than the standard Windows Firewall there is an issue (aka bug) that it is causing the client application to fail prior to the security prompt being dismissed!