我已经用我的网络浏览器登录了这个网站,每当我尝试打电话时
WebClient myWebClient = new WebClient();
string str = myWebClient.DownloadString("http://localhost/myxml.aspx");
Response.Write(str.ToString());
或者
XmlTextReader reader = new XmlTextReader(url);
while (reader.Read()) {
Response.Write(reader.ReadOuterXml());
}
Response.Write 将登录页面返回给我。
是否可以将用户 SessionId 附加到 WebClient 或 XmlTextReader 或者如何使用当前登录的用户请求 C# 中的另一个页面?