2016-06-20 11 views
0

Ich arbeite mit Azure Event Hub Sender und Prozessor-Tutorial und ich bin hinter einem Enterprise-Proxy sitzen.Azure Event-Hub-Prozessor funktioniert nicht mit Enterprise-Proxy

Das Senden von Ereignissen an den Ereignis-Hub funktioniert einwandfrei, aber ich habe Probleme, eventHubProcessor Zugriff auf den Azur-Ereignis-Hub zu erhalten. Es scheint mir, dass ich einige Proxy-Probleme habe.

I verwenden

  • DefaultEndpointProtocol = https

als Speicherverbindungszeichenfolge und I set

  • ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https;

Ich habe auch viele verschiedene Varianten versucht, den Proxy in App.config-Datei festzulegen. Z.B.

<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> 

Witout erfolglos :(

Bei "eventProcessorHost.RegisterEventProcessorAsync (Optionen) .Wait();" Ich bekomme die Ausnahme

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) 

niemanden hat eine Idee ?? Viele Vielen Dank für Ihre Zeit.

Grüße, Roland

Antwort

0

Grund für das Problem ist, dass ServicePointManager Proxys im Falle von HTTPS nicht unterstützt.

Um das Problem zu ändern, alles zu HTTP

In Ihrem Hauptprogramm zu lösen:

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

In Ihrem App.config

<system.net> 
    <defaultProxy enabled="true" useDefaultCredentials="true" > 
    <proxy 
     autoDetect="false" 
     bypassonlocal="true" 
     proxyaddress="http://##.###.###.###:8080" 
     usesystemdefault="false"/> 
    </defaultProxy> 
</system.net> 
Verwandte Themen