У меня есть следующий код:..следующие Базовое соединение закрыто: Непредвиденная ошибка приема
private Uri currentUri;
private void Form1_Load(object sender, EventArgs e)
{
currentUri = new Uri(@"http://www.stackoverflow.com");
HttpWebRequest myRequest = (HttpWebRequest) HttpWebRequest.Create("http://www.stackoverflow.com");
WebProxy myProxy = new WebProxy("120.198.230.8:81");
myRequest.Proxy = myProxy;
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
webBrowser1.DocumentStream = myResponse.GetResponseStream();
webBrowser1.Navigating += new WebBrowserNavigatingEventHandler(webBrowser1_Navigating);
}
void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
if (e.Url.AbsolutePath != "blank")
{
currentUri = new Uri(currentUri, e.Url.AbsolutePath);
HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(currentUri);
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
webBrowser1.DocumentStream = myResponse.GetResponseStream();
e.Cancel = true;
}
}
после компиляции:
error: An unhandled exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The underlying connection was closed: An unexpected error occurred on a receive.
на линии HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
, пожалуйста, помогите me
Google - ваш друг. [См. Сообщение об ошибке 3] (http://support.microsoft.com/kb/915599). – DGibbs
@DGibbs Google привел меня сюда. – caiosm1005