I am trying to connect oracle database using PHP API/Script file in ASP.NET Application (Server side)
It does get response status as "OK" but no data is binded. it throws the following error.
Stream exception - .
var obj = new Newtonsoft.Json.Linq.JObject();
obj["province_id"] = "1";
obj["language"] = "AR";
obj["web_username"] = MD5Hash("XYZ");
obj["web_password"] = MD5Hash("ZYZ");
var serialized = JsonConvert.SerializeObject(obj);
// Response.Write(serialized);
//create the constructor with post type and few data
MyWebRequest myRequest = new
MyWebRequest("https://XYZ/android/php/get_area_list.php", "POST", serialized);
//show the response string on the console screen.
var deserl = myRequest.GetResponse();
// Response.Write(deserl);
Newtonsoft.Json.Linq.JObject jsonDes = Newtonsoft.Json.Linq.JObject.Parse(deserl);
// Response.Write(jsonDes);
string statuscode = jsonDes["status"].ToString();
Session["userid"] = jsonDes["userid"].ToString();
//Response.Write(statuscode);
if (statuscode == "Success")
{
string uid = jsonDes["userid"].ToString();
//Response.Write(uid);
// Session["username"] = jsonDes["username"].ToString();
Session["userid"] = jsonDes["userid"].ToString();
Response.Redirect("~/Default4.aspx");
}
else
{
//Label1.Visible = true;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…