2016-06-20 3 views
0

私はAzureイベントハブの送信者とプロセッサのチュートリアルで働いており、エンタープライズプロキシの背後に座っています。Azureイベントハブプロセッサがエンタープライズプロキシで動作しない

イベントハブへのイベントの送信は本当にうまく動作しますが、私はイベントハブプロセッサーをAzurイベントハブにアクセスさせる問題があります。プロキシの問題があるようです。

Iが使用

  • DefaultEndpointProtocol = HTTPS

ストレージ接続文字列として、私は

  • ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Httpsを設定します。

また、App.configファイルでプロキシを設定するためにさまざまなバリエーションを試しました。例えば。

で任意の成功:(

Witout

<configSections> 
    <sectionGroup name="proxyGroup"> 
     <section name="basicProxy" type="Proxy.Configuration.CustomProxySection, Proxy" /> 
    </sectionGroup> 
    </configSections> 

<system.net> 
    <defaultProxy enabled="true" useDefaultCredentials="true" > 
     <proxy usesystemdefault="true"/> 
    </defaultProxy> 
    </system.net> 

"eventProcessorHost.RegisterEventProcessorAsync(オプション).WAITは();" 私は誰のアイデア??多くの を持ってい

InnerException: 
    HResult=-2146233087 
    Message=Der angeforderte Name ist gültig, es wurden jedoch keine Daten des angeforderten Typs gefunden 
    Source=Microsoft.ServiceBus 
    StackTrace: 
    Server stack trace: 
    Exception rethrown at [0]: 
     bei Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
     bei Microsoft.ServiceBus.Messaging.Amqp.Transport.WebSocketTransportInitiator.Complete(IAsyncResult connectAsyncResult, Boolean completeSynchronously) 
    Exception rethrown at [1]: 
     bei Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
     bei Microsoft.ServiceBus.Messaging.Amqp.AmqpMessagingFactory.ConnectAsyncResult.<GetAsyncSteps>b__9d(ConnectAsyncResult thisPtr, IAsyncResult r) 
     bei Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 
    Exception rethrown at [2]: 
     bei Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
     bei Microsoft.ServiceBus.Messaging.Amqp.AmqpMessagingFactory.EndCreateConnection(IAsyncResult result) 
     bei Microsoft.ServiceBus.Messaging.Amqp.FaultTolerantObject`1.CreateAsyncResult.<GetAsyncSteps>b__1(CreateAsyncResult thisPtr, IAsyncResult r) 
     bei Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result) 
    Exception rethrown at [3]: 
     bei Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 
     bei Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult) 

例外を取得しますあなたの時間の多くのありがとう。

よろしく、ローランド

答えて

0

問題は、ServicePointManagerがHTTPSの場合にプロキシをサポートしないという理由があります。あなたのメインプログラムではHTTP

にすべてを変えるの問題を解決するために

string storageConnectString=string.Format("DefaultEndpointsProtocol=http;...."); 
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http; 

あなたのApp.configで

<system.net> 
    <defaultProxy enabled="true" useDefaultCredentials="true" > 
    <proxy 
     autoDetect="false" 
     bypassonlocal="true" 
     proxyaddress="http://##.###.###.###:8080" 
     usesystemdefault="false"/> 
    </defaultProxy> 
</system.net> 
関連する問題