Windows RSVP QoS service is stopped when no QoS-socket active. Can that be changed? - winsock2

We have a program that uses QoS-sockets, our softphone application uses QoS for the RTP.
That application is normally left running, sometimes however it is restarted. (Stop, wait 300ms, start.)
We have found that when the softphone-application is stopped that the last one useing QoS on the server, so the RSVP QoS-service on windows is stopped as well.
When we restart our application the RSCP QoS-service normally starts really fast, however sometimes the service start takes a full 30 seconds, causing our application to start slowly as well.
Anyone know if I can configure the service not to stop each time?
The computer is Windows XP SP3, with Windows Firewall turned on. (Our application do have an exception in the firewall.)
Regards
Leif

In the end this was solved with a workaround.
In the main-application we now open a QoS-socket, which we keep open until the main-application ends. That way the RSVP service cannot be closed, since it's in use.
(I found that opening the socket without bind()-ing works, so we don't need any port.)

Related

IIS 8.5 new suspend option

I configured Windows 2012R2 with IIS 8.5 and turned on the new suspend option.
According to the documentation the state is written to disk and resources freed up.
I have a site that is strong on SignalR, when the site is started there is always a never-exiting thread that keeps track of parameters of a game, users come to the site, play the game and the state is saved in the database.
Before when the site terminated it would load everything from database to restore the game-state, which worked fine but it took a REAL long time before the site would start (sometimes up to 5 minutes).
Now I configured the suspend option and it looks to work fine, site starts up in matter of seconds, BUT the never-ending thread.. has ended.
What could be the culprit? Is there an event that is called when the site goes into suspend or comes out of suspend instead of a cold startup?
It's not a good idea to run background threads within IIS. See http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx/
Possible solution is to have a Windows Service (I recommend TopShelf for easy bootstrap) that runs your background operations and communicates with your ASP.NET via API.
See this question: IIS Background thread and SignalR

When does Windows cancel an in-flight WDF request?

I am writing a Windows device driver using WDF (KMDF) for a USB3 device that transfers data in large chunks at a time. I've written a user-level application that tests this functionality, and for the most part, things work.
The problem I encounter is this: I have found that when I force-close (CTRL+C from a cmd window) the application mid-transfer, the on-going data transfer at the time of cancel immediately stops and the host seems to simply stop communicating with that endpoint. I have observed this on a USB bus trace. The requests return in the function driver as "STATUS_CANCELLED"
I have looked at other similar third party devices and ran their test applications with their drivers on those devices and found that when I kill their test applications mid-data-transfer, the transfer completes before the application closes.
My question:
How/when does Windows decide to kill in-flight requests when applications are closed?
Is there any way to mark the request as "uncancelable"? I've scoured the documentation but found nothing that suggests I need to do something to keep requests from being cancelled behind the scenes mid-transfer.
Any insights appreciated, thanks.
It's not about the device driver; it's about the way the console application handles the Ctrl-C event. The console application must trap the Ctrl-C event, and wait for the transfer to finish before it exits.

XNA UI hangs while using WCF remotely

I have an XNA client which communicates with a WCF service to operate.
The XNA application is actually a multiplayer pokergame.
When I run the WCF service locally, everything works well.
However, I lately deployed my WCF service into Azure. Now when I launch the client,
it starts OK, buttons are responsive and clickable.
The same is when I launch another client, and there is now an option to start a game
(as there are 2 players).
Again, the StartGame button is clickable for both clients.
However, once the game commences, the UI hangs and becomes unresponsive.
I can't reproduce this locally. This only happens while using the Azure service.
Note I'm not using any callbacks from the server back to the client, my client continuously polls the server and operates according that information.
Any ideas?
Solved. Problem was I had another service function being called continuously, not on a new thread. While executing locally, traffic was fast enough to overcome this.
However, running remotely caused application to hang due to the synchronous calls.

Lync & Remote Desktop Connections

Situation:
My organization has "Unified Communication" with Microsoft Lync. I occasionally have to sit at another desk, so I use a remote desktop connection to continue using my usual computer. This means I have to log out of Lync on my usual computer so I can log into Lync at the other one. When I return to my usual computer, I never remember to log back into Lync.
Question:
Is there a way I can automate the process? Like, can I do something so that every time I start a remote session with my usual computer, it automatically exits Lync, and every time I end a remote session it automatically starts Lync up again?
My experience is limited to simple batch files and Visual Basic, but I'm pretty good at learning just enough of something to do simple tasks.
Any input is appreciated. Thank you.
Lync will let you log in to multiple devices simultaneously, or end-points as Microsoft calls them. If your usual computer is locked, that device should "detect" you as away. If you are logged in to another computer, THAT one will display your presence as Available, unless you manually change your status.
There is no reason to log off of the usual computer.
Do you really need to log out of Lync at your usual computer? Lync lets you sign in to multiple devices, and will generally do the right thing in ensuring you receive any IMs/calls.
So when you switch machines, you could just sign in on the new machine, leaving the old logged in.
Or is there a specific reason why this doesn't work for you?

Call to WebRequest.GetSystemWebProxy taking too long

This is quite odd.
I have a windows service that works OK, but when the computer is restarted the service get stuck on a call to WebRequest.GetSystemWebProxy for 11 minutes. About 11 minutes, on XP and on Vista, where it was tested so far, all the time. If the computer is connected to the company's domain, it works. But when it's not, I'm facing this issue.
Some other weird things happens on Vista as well. For instance, it doesn't have an active network connection (disconnected) during this time and some other Windows system warnings appears just after these 11 minutes. Before 11 minutes the system seems more or less hanged, waiting for something.
It's not about my machine, because I've tested it on XP, and Vista, and also on some VMs of them.
I'm pretty sure that the call to WebRequest.GetSystemWebProxy in your case actually tries to connect to some system on your company network to
Actually find out if the Proxy server is found
Get the script that automatically configures these settings on your system
Please try to use a tool like Fiddler or WireShark to see which outgoing connections are attempted. The url will point out the location it tries to connect to and the reason for the call.