Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckIfWebServiceIsUpAndRunning throws an Exception #17

Open
foxmalderalex opened this issue Sep 17, 2019 · 1 comment
Open

CheckIfWebServiceIsUpAndRunning throws an Exception #17

foxmalderalex opened this issue Sep 17, 2019 · 1 comment

Comments

@foxmalderalex
Copy link

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

@soso-maitha
Copy link

i am getting same error. I think this is because flask service is not running on local machine. i.e the urls in the MatplotlibCS.cs are not working
/// Python web service URL
private string _serviceUrlCheckAliveMethod = "http://127.0.0.1:57123/";
/// Python web service URL
private string _serviceUrlPlotMethod = "http://127.0.0.1:57123/plot";
/// Kill web service url
private string _serviceUrlKillMethod = "http://127.0.0.1:57123/kill";

the flask service is setup in the matplotlib_cs.py which should run through c# but it is not executing successfully.

should we change the port number 57123 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants