06-23-2021 08:20 AM
Hi,
I am having a lot of trouble with an executable that has a webservice build into it. At first it didn't work at all, webservice was not accessible using a webbrowser. After trying a lot I think the build-in application webservice was competing with the system application webserver for the same port (80). After setting the system application webserver at port 8080 it worked sometimes. There still seems to be other problems. The PC has multiple network interfaces for connecting GigE camera’s. It looks like sometimes the webservice binds to the wrong ethernet interface, because when I disable the additional network interfaces, there is a much higher chance the webservice works. No guarantee though, sometimes it works, sometimes not. Windows firewall has been disabled.
At some point it worked, but now I have a problem the other way around. The webservice continues to be active, even after terminating the application. Even after a reboot, the webservice is still active most times. When it does, the webservice fails to communicate with the application, this is done using global variables. The applications seems to pop-up an error message for a very short time, unable to read the message. It is possible to access the webservice by a browser, but it does not work as it should of course, because there is no communication between the webservice and the application that contains it.
When I now build a new version of the executable which also contains a new version of the webservice, the old version of the webservice that was in a previous version of the executable keeps to be active, and there is no communication with the new version of the application using the global variables.
Sometimes when I run the old version of the executable and stop the executable, the old version of the webservice also stops. And when I then run the new version of the executable which contains the new version of the webservice, the new versions of the webservice is active, and is able to communicate with the application using the shared global variables.
This works until I reboot the system, then the old version of the webservice is active again.
Anyone knows what can be the problem ?
Some questions I have that might help to solve the problem:
1) I am not completely sure how the webservice-build-in-an-application is supposed to work. Should it start when the executable starts running ? And when is it supposed to stop ? After the executable stops running ? Or after the executable exits ? Or is it normal that it is still active after the application has terminated ?
2) I am using 3 accounts on the PC. One for development, one for the user(s), and an administrative account. Are the webservices administrated per user account ?
3) This is probably the most important one. Is there a way to manually remove webservices that should be no longer active ? When I use the WebservicesManagement tool at http://localhost:3582, there are no published webservices. I have never seen a webservice listed there. The webservice seems to be in the folder: C:\Users\User\AppData\Local\Temp\TJTSWW6KJNJN3K7T. When I remove the temporary folder it is there again after a reboot. It seems to be automatically recovered from another source. Are the webservices somewhere stored where I can remove them manually ?
Thanks for any advise.