Skip to content

CheckIfWebServiceIsUpAndRunning throws an Exception#17

Description

@foxmalderalex

Throws at 馃憤

    private bool CheckIfWebServiceIsUpAndRunning()
    {
        try
        {
            _log.Info("Check if python web-service is already running");
            //Creating the HttpWebRequest
            var request = WebRequest.Create(_serviceUrlCheckAliveMethod) as HttpWebRequest;
            //Setting the Request method HEAD, you can also use GET too.
            request.Method = "GET";
            //Getting the Web Response.
            var response = request.GetResponse() as HttpWebResponse; <<<<<

No connection could be made because the target machine actively refused it No connection could be made because the target machine actively refused it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions