Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
256 views
in Technique[技术] by (71.8m points)

c# - ASP.NET - PHP API CALL Error - This stream does not support seek operations

enter image description hereI 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 - This stream does not support seek operations.

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;
        }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...