HTTPSocket and Windows firewall / antivirus software

[quote=180198:@Aaron Hunt]1: attempt made, license checks out, “pass” message sent back to the computer.
2: computer replied with “fail”, software did not get authorized.[/quote]
What conditions cause your software to respond with 2?

It’s based on two things: the message received from the server, and the successful writing of the file if the message was “pass”.

In this case, the “fail” was, the message received from the server was not what was sent to the computer. There are a variety of responses, and then a ‘case else’ catch all. This was the ‘case else’.

I’m assuming if the response received was none of the valid responses that can actually be sent, that means one of two things:

  1. a timeout occurred
  2. the message was sent but not received <-- can this even happen? Please explain when this can happen. I honestly don’t understand.

Since I’ve got a 30 second timeout now, I think it’s pretty unlikely that the timeout is happening in these cases. I just realized I should ask the users how long they waited for the response. I just assumed they were not actually waiting 30 seconds.

Within the realm of possibility, but very unlikely. The more likely scenario would be an antivirus preventing the creation of a file.

Yes, that appears to be what was happening. So, I’ve simply changed the response message for that situation, to tell the user that they must turn off the anti-virus / firewall, and why.

That also explains why it’s only happening on Windows.

Some Mac users have Avast installed, but that doesn’t seem to cause a problem. There is a different problem on Mac, because of the changes Apple has made to the way the file system works (as in, it is horribly slow now).

Thanks for the help!

Well 2 years ago i’ve had familiar issues with firewalls and complaints why my software is calling home. It costed me a lot of support calls and sometimes the users were not priviledged to make changes on their personal or corporate firewalls. One of my key customer even do not has direct internet access for his network clients at all and is using a squid proxy server instead with tight squidguard settings.

So I’ve reduced the calling home just for checking available updates and changed my license handling dramatically using license files today. These are send by email or in rare cases by usb-sticks in nice frames like this. I do this manually but this could be also automated. Basically this license file is a small crypted sqllite database with certain unique parameters only a single customer can have. This license file of course contains other informations aswell for enhanced support purposes and is just drag and dropped into my software and stored in each users %appdata% folder, easy piece of cake.

Tomas, thanks for outlining your alternative. Clever solution!

How does your app check for updates? Do you use a socket, or does it just open a webpage? I guess to avoid firewall issues, the latter?

I am using former UltraUpdater from Paul Lefebvre, I’ve bought his sources back in 2011 or 2012 and customized it for my Apps. And yes it is using HTTPSockets.

thats what I’m facing. I need to disable Kaspersky’ Proactives guard. Cuz when Its turn On
and Its about to create a file, immediately it close my program and delete it

It sounds as if your program tries to write the file in an unusual place (the app directory, or the Windows directory perhaps?). Have you looked into saving the file in %appdata% (as suggested by @Tomas Jakobs ) or some other “usual place”? The antivirus should not complain about that.

HI @Louis Desjardins No, I’m Using %Appdata% folder to save program preferences and setup.

When the Antivirus Stop my App, is when I try to download a File from the HTTPSecureSocket
In the SpecialFolder.Documents.(“TheNameOfMyApp”)

the desired file in a PDF, I’ll gonna test if I only generate the PDF based on the XML downloaded (Without XML attached), avoids the Antivirus