Your mistake is this line:
string strres1 = strResponse.ToString();
After this your variable
strres1
is equal to
System.Net.HttpWebResponse
. This is not a valid JSON string. This happens because the default behaviour of
ToString
inherited from
object
is to output the fully qualified type name. It is also an abomination to prefix a variable name of a type that is definitely not string with str. This made you think you had a string when it was really a
HttpWebResponse
object.
You probably meant to fetch the content from the
response stream
. The stream is fetched via
strResponse.GetResponseStream
method. Once you've got the stream you can read the content from there. That's the way it is done so please stick to that.
Best Regards,
—MRB