IWebProxy.GetProxy メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IWebProxy.GetProxy メソッドの意味・解説 

IWebProxy.GetProxy メソッド

プロキシURI返します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

解説解説
使用例使用例

GetProxy メソッド使用して、WebRequest がインターネット リソースアクセスするために使用する URI返す例を次に示します

   
Public Shared Sub Main()
    Dim webProxy_Interface As New
 WebProxy_Interface(New Uri("http://proxy.example.com"))
    
    webProxy_Interface.Credentials = New NetworkCredential("microsoft",
 ".Net")
    
    Console.WriteLine("The web proxy is : {0}", webProxy_Interface.GetProxy(New
 Uri("http://www.microsoft.com")))
    
    'Determine whether the Web proxy can be bypassed for the site "http://www.microsoft.com".
console.writeline("For the Uri http://www.microsoft.com , the
 ")
    If webProxy_Interface.IsBypassed(New Uri("http://www.microsoft.com"))
 Then
        Console.WriteLine("webproxy is by passed")
    Else
        Console.WriteLine("webproxy is not bypassed")
    End If 
End Sub 'Main

WebProxy_Interface webProxy_Interface = new WebProxy_Interface(new
 Uri("http://proxy.example.com"));

webProxy_Interface.Credentials = new NetworkCredential("microsoft",
 ".Net");

Console.WriteLine("The web proxy is : {0}", webProxy_Interface.GetProxy(new
 Uri("http://www.microsoft.com")));

// Determine whether the Web proxy can be bypassed for the site "http://www.microsoft.com".
if(webProxy_Interface.IsBypassed(new Uri("http://www.microsoft.com")))
    Console.WriteLine("Web Proxy is by passed");
else
    Console.WriteLine("Web Proxy is not by passed");

WebProxy_Interface^ webProxy_Interface = gcnew WebProxy_Interface( gcnew Uri( "http://proxy.example.com"
 ) );

webProxy_Interface->Credentials = gcnew NetworkCredential( "microsoft",".Net"
 );

Console::WriteLine( "The web proxy is : {0}", webProxy_Interface->GetProxy(
 gcnew Uri( "http://www.microsoft.com" ) ) );

// Check if the webproxy can ne bypassed for the site S"http://www.microsoft.com".
if ( webProxy_Interface->IsBypassed( gcnew Uri( "http://www.microsoft.com"
 ) ) )
{
   Console::WriteLine( "Web Proxy is by passed" );
}
else
{
   Console::WriteLine( "Web Proxy is not by passed" );
}
WebProxyInterface webProxyInterface = new WebProxyInterface(
    new Uri("http://proxy.server.com"));
webProxyInterface.set_Credentials(new NetworkCredential(
    "microsoft", ".Net"));
Console.WriteLine("The web proxy is : {0}", webProxyInterface.
    GetProxy(new Uri("http://www.microsoft.com")));

// Check if the webproxy can ne bypassed for the site 
//"http://www.microsoft.com".
if (webProxyInterface.IsBypassed(new Uri(
    "http://www.microsoft.com"))) {
    Console.WriteLine("Web Proxy is by passed");
}
else {
    Console.WriteLine("Web Proxy is not by passed");
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からIWebProxy.GetProxy メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIWebProxy.GetProxy メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIWebProxy.GetProxy メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

IWebProxy.GetProxy メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IWebProxy.GetProxy メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS