How to programmatically check if a wcf service is stopped or not

<>

This question already has an answer here:

Answers


You could maybe check if the service is online by sending a http request to it?

public static Boolean isSiteOnline(String url)
    {
        Boolean result = true;
        HttpWebRequest httpReq = (HttpWebRequest)WebRequest.Create(url);
        httpReq.AllowAutoRedirect = false;
        HttpWebResponse httpRes = (HttpWebResponse)httpReq.GetResponse();
        if (httpRes.StatusCode != HttpStatusCode.OK)
            result = false;

        httpRes.Close();
        return result;
    }

Need Your Help

Do queries executed in a Postgres trigger procedure run in the same transaction?

sql postgresql stored-procedures triggers postgresql-9.1

I have a BEFORE DELETE trigger which inserts rows into another table using SPI_exec.