I have a web application in IIS 7. There is a page with Button1 . When I click this Button1 , the following method starts:
string url = "http://example.com"; string resultStr = ""; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); string encoding = resp.CharacterSet; if (encoding.Equals(String.Empty)) encoding = "UTF-8"; Stream strResponse = resp.GetResponseStream(); int bytesSize = 0, c = 0; byte[] downBuffer = new byte[2048];
As you can see, TextBox1 will contain the html code of the remote page.
There was a problem: while this method works, I cannot load other pages! How to solve this problem?
I know that there is an application pool that stores application threads, so the server can process multiple threads at the same time ... But this does not work for me. Why?
user1025125
source share