Jest strona działająca w intranecie
http://192.168.....:..../getMem/....
Próbuję uzyskać informacje z tej strony w c#
var client = new HttpClient();
string uri = "http://192.168....:..../getMem/...";
HttpClient httpClient = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage();
request.RequestUri = new Uri(uri);
request.Method = HttpMethod.Post;
HttpResponseMessage response = httpClient.SendAsync(request).Result;
var responseString = response.Content.ReadAsStringAsync();
JObject joResponse = JObject.Parse(responseString.Result);
JObject ojObject = (JObject)joResponse["response"];
JArray array = (JArray)ojObject["dane"];
foreach (JObject item in array) // <-- Note that here we used JObject instead of usual JProperty
{
Debug.WriteLine(item.ToString());
}
Ale linia JArray array ... zwraca błąd
responseString.Result "{"timestamp":....,"status":405,"error":"Method Not Allowed","message":"","path":"/getMemb.../..."}" string
W jaki sposób uzyskać odpowiedź ze strony webserwisu ?