IWebProxyScript.Run(String, String) 方法

定義

執行指令碼。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 System::String ^ Run(System::String ^ url, System::String ^ host);
public string Run (string url, string host);
abstract member Run : string * string -> string
Public Function Run (url As String, host As String) As String

參數

url
String

僅供內部使用。

host
String

僅供內部使用。

傳回

String

String

所傳回只供內部使用的值。

備註

HttpWebRequest執行物件時,可能需要執行 WPAD (Web Proxy 自動偵測) 通訊協定,以偵測是否需要 Proxy 才能連線到目的地 URL。 在此程式中,系統會下載並編譯記憶體中的 PAC (Proxy 自動設定) 腳本,並嘗試根據 PAC 規格執行 FindProxyForURL 函式。

這麼做時,系統會在應用程式內建立內部應用程式域,以最少的許可權執行,最重要的是,它不會將 UI 許可權授與這個新的應用程式域。 Proxy 的評估和執行 FindProxyForURL javascript 函式會在這個新應用程式域的內容中發生,而且在此程式期間,系統可能需要根據 PAC 規格執行數個協助程式函式。

適用於