Orthanc api not accessible via http

Hi,
I installed latest orthanc server successfully and in config remote access allow to true, enable authentication to true and register user . And study store successfully firewall also disabled.
Now trying to fetch info by below link it shows empty result or no json,
code:
http://localhost:8042/tools/lookup
string data = StudyInstanceUID;
WebRequest myReq = WebRequest.Create(url);
myReq.Method = “POST”;
myReq.ContentLength = data.Length;
myReq.ContentType = “application/json; charset=UTF-8”;

        UTF8Encoding enc = new UTF8Encoding();
        using (Stream ds = myReq.GetRequestStream())
        {
            ds.Write(enc.GetBytes(data), 0, data.Length);
        }
        WebResponse wr = myReq.GetResponse();
        Stream receiveStream = wr.GetResponseStream();

ERROR-
The remote server returned an error: (401) Unauthorized.
Help me how to solve this problem.

Hi,

You should probably add a login/pwd or a auth header to your query. Or disable authentication in the Orthanc config… check the "AuthenticationEnabled" option

HTH,

Alain