请问一个java带sessionid访问asp.NET的问题?
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(strUrl); myReq.Method = "post"; UTF8Encoding encoding = new UTF8Encoding(); CookieContainer cookies = new CookieContainer(); myReq.CookieContainer = cookies; Cookie appCookie = new Cookie("ASP.NET_SessionId", sessionid); myReq.CookieContainer.Add(new Uri(strUrl), appCookie); myReq.ContentLength = byte1.Length; myReq.ReadWriteTimeout = 1000; Stream newStream = myReq.GetRequestStream(); newStream.Write(byte1, 0, byte1.Length); newStream.Close();