Posts

Showing posts from September, 2012

Killing a windows service that seems to hang on "Stopping"

It sometimes happens (and it's not a good sign most of the time): you'd like to stop a Windows Service, and when you issue the stop command through the SCM (Service Control Manager) or by using the ServiceProcess classes in the .NET Framework or by other means (net stop, Win32 API), the service remains in the state of "stopping" and never reaches the stopped phase. It's pretty simple to simulate this behavior by creating a Windows Service in C# (or any .NET language whatsoever) and adding an infinite loop in the Stop method. The only way to stop the service is by killing the process then. However, sometimes it's not clear what the process name or ID is (e.g. when you're running a service hosting application that can cope with multiple instances such as SQL Server Notification Services). The way to do it is as follows:
1.Go to the command-prompt and query the service (e.g. the SMTP service) by using sc:



2.    sc queryex SMTPSvc This will give you the followin…

ISA Server 2006 L2TP/IPSec certificate

Consider the following scenario:

You've set up L2TP security for VPN access on ISA server and you've also published a site using HTTPS.
For both services you use a certificate for the domain let's say server.company.com.

Now you want to publish another site, let's say server2.company.com using HTTPS. You import the new certificate, create the publishing rule and everything is OK but the VPN...

This is because the ISA server might select the new certificate to use for VPN connections.

In that case you have to create a custom certificate request using the correct address and Server Authentication and IP sercurity IKE intermediate key usage and install the certificate.