HTTPリクエストをサーバーに送信するWebアプリケーションがあります.WebRequest.Createメソッドを使用しています。私の質問は、HTTP 要求のドメイン名または IP を変更する必要があるのですが、適切な場所が表示されません。見てください。
public WebWrapper()
{
this.UseProxy = false;
this.UA = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1";
this.Proxy = new WebProxy();
this.LastPage = "http://google.com/";
this.cookies = new CookieContainer();
}
public string httpGet(string Address, [Optional, DefaultParameterValue(true)] bool Redirect)
{
string str;
try
{
IEnumerator enumerator;
this.WebRequest = (HttpWebRequest) WebRequest.Create(Address);
this.WebRequest.Method = "GET";
this.WebRequest.Headers.Set("Accept-Language", "en,en-us");
this.WebRequest.Headers.Add("Cache-Control", "no-cache");
this.WebRequest.CookieContainer = this.cookies;
this.WebRequest.UserAgent = this.UA;
this.WebRequest.Referer = this.LastPage;
ここにドメインの場所がありますか、それとも間違っていますか?
this.WebRequest = (HttpWebRequest) WebRequest.Create(Address);
この定数(アドレス)は、コードのどこにありますか?私はSAE for .NETを使用しています