One of the common patterns you’ll see in the cloud adoption is how you are going to move data (either from on-premise or devices) into the cloud. There will be cases when the product is forced to securely and reliably process very large amounts of information from many concurrent publishers. For these purposes, Azure offers the Event Hubs platform that is capable of ingesting events from multiple publishers and further push it to the consumers. Additionally, the organization will also have certain security restrictions and make use of proxy servers in their environment. In this blog, we will show how you can avoid this problem while working with any SaaS product.
We made use of a lightweight agent that transmits the technical metadata of BizTalk Environment to Azure Event Hub. We received the below exception while posting the event to Azure Event Hubs through a proxy.
ERROR – 1.0.6020.2507. TransmissionManager: TransmitData. System.AggregateException: One or more errors occurred. —> Microsoft.ServiceBus.Messaging.MessagingCommunicationException: An attempt was made to access a socket in a way forbidden by its access permissions —> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
To overcome the problem, we followed the below steps to use the default credentials for the account from Internet Explorer. This solution will be useful for any SaaS based product that works with Event Hubs through a proxy.
1. On your IE browser, navigate to Internet Options -> Connections -> Local Area Network (LAN) Settings. Update the Proxy Settings information in the LAN settings screen.
2. Add the default proxy setting details in the app config file (of your SaaS application)
<defaultProxy useDefaultCredentials=”true” />
For BizTalk360 cloud, you need to add these proxy details information under the <configuration >section in Agent.Service.exe.config file
3. Restart the corresponding Windows service that is responsible for pushing the data to Event Hubs.
Though the account is logged into Chrome, Edge or Firefox, the above settings will be populated by default. We hope this solution solves your problem on Event Hubs while working with proxy!!!