Lire contenu page web

WebRequest oweb = (HttpWebRequest)WebRequest.Create("http://localhost:1963/path");
//Si besoin d'authentification :
oweb.Proxy = WebRequest.GetSystemWebProxy();
oweb.Proxy.Credentials = new NetworkCredential("UserName", "XXXXX");

WebResponse oresp = oweb.GetResponse();
StreamReader sr = new StreamReader(oresp.GetResponseStream());
string content = sr.ReadToEnd();
oresp.Close();

Thread non propriétaire

System.Threading.Thread t = new System.Threading.Thread(AsyncFunction);
t.Name = "My thread";
t.Start();

private void AsyncFunction()
{
tb.Dispatcher.BeginInvoke(new Action(() =>
{
tb.Text += "ok";
}));
}

Uploader un fichier

<asp:FileUpload runat="server" ID="fileup" />
<asp:Button runat="server" ID="cmdEnvoyer" OnClick="cmdEnvoyer_Click" />
protected void cmdEnvoyer_Click(object sender, EventArgs e)
{
if (fileup.HasFile)
{
fileup.SaveAs("path");
}
}
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1000000000" />
</requestFiltering>
</security>
</system.webServer>

<httpRuntime targetFramework="4.5" maxRequestLength="1000000" executionTimeout="200"/>