2017-12-04 8 views
0

プロキシ経由でアプリケーションアプリケーションを実装する必要があります。プロキシによるアプリケーションの分析

 var config = new TelemetryConfiguration 
     { 
     InstrumentationKey = "key", 
     TelemetryChannel = new Microsoft.ApplicationInsights.Channel.InMemoryChannel() 
     }; 
     var client = new TelemetryClient(config); 

一部のサーバーと通信し、私は唯一のプロキシにすべてのAppInsights要求を必要とする私のPC上でWPFアプリケーション(ファイアウォールが有効になって)、残りにはない存在です。

私はすべてのAppInsightsリクエストでプロキシを設定し、最後にそれをきれいにすることができますが、サーバとの通信は絶えず継続し、AppInsignsリクエスト時には発生する必要はない代理人。

WebRequest.DefaultWebProxy = new WebProxy("myproxy"); //so does not fit (that's bs) 
_telemetry.TrackEvent(key, properties, metrics); 
Flush(); 
WebRequest.DefaultWebProxy = WebRequest.GetSystemWebProxy(); 

どうすればこの問題を解決できますか?前もって感謝します。

答えて

0

ソリューション

  var config = new TelemetryConfiguration 
      { 
      InstrumentationKey = "key", 
      TelemetryChannel = new Microsoft.ApplicationInsights.Channel.InMemoryChannel() 
      }; 
      config.TelemetryChannel.EndpointAddress = "https://myproxy.proxy"; 
      var client = new TelemetryClient(config); 

そして、あなたのプロキシがhttps://dc.services.visualstudio.com:443/v2/track

にトラフィックをリダイレクトする必要があります
関連する問題