# UE4.27 Remote API listener timeouts requests from C# HttpClient on LAN

**URL:** <https://forums.unrealengine.com/t/ue4-27-remote-api-listener-timeouts-requests-from-c-httpclient-on-lan/491503>\
**Category:** C++\
**Tags:** Networking, remote, unreal-engine, question, CPP\
**Created:** [December 1, 2021, 4:28pm UTC](https://forums.unrealengine.com/t/ue4-27-remote-api-listener-timeouts-requests-from-c-httpclient-on-lan/491503 "2021-12-01T16:28:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brzht](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brzht/32/710746_2.png) [@brzht](https://forums.unrealengine.com/u/brzht)\
**Post date:** [December 1, 2021, 4:28pm UTC](https://forums.unrealengine.com/t/ue4-27-remote-api-listener-timeouts-requests-from-c-httpclient-on-lan/491503/1 "2021-12-01T16:28:11Z")

</div>

I’m using self-written C# WPF application to control UE level in play mode (visualizing some stats). One of the app features - controlling UE level that is started on other PC available on LAN.

PUT requests are sending by C# System.Net.Http.HttpClient that is configured next way:

```
HttpClient = new HttpClient();
HttpClient.Timeout = TimeSpan.FromSeconds(5);
HttpClient.BaseAddress = new Uri(BaseUri + _Endpoints["ObjectFunction"]);
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

```

BaseUri consists of “http://MACHINE\_IP:30010” where MACHINE\_IP is localhost or IP of second machine in LAN.  
\_Endpoints[“ObjectFunction”] is /remote/object/call

When I’m controlling UE level in PIE on localhost (i.e. my controller app and Unreal are started on same machine) - it work perfect.  
When I’m controlling UE level on other machine in LAN (IP is 10.0…) - it catches few request (i.e. they are accepted and needed changes appears in level) and then I start catching timeouts on all further requests.

Timeouts continues until I restart my controller app or “reset” HttpClient by same method as I mentioned above:

```
HttpClient = new HttpClient();
HttpClient.Timeout = TimeSpan.FromSeconds(5);
HttpClient.BaseAddress = new Uri(BaseUri + _Endpoints["ObjectFunction"]);
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

```

“Reset” happens via special button in my app so it can be performed “on runtime”.  
After such reset, UE catches few request and starts timeouting again.

Interesting moment is that I tried to make few calls from Postman on first LAN PC to UnrealEngine on second LAN PC and it works great - timeout never occured.

My “config”:

1. Two PC’s in one LAN network, both with turned off firewall. No additional network filtration soft/hardware.
2. UE 4.27 on both.
3. Add following to Engine/Config/BaseEngine.ini:  
[HTTPServer.Listeners]  
DefaultBindAddress=0.0.0.0
4. Start PIE of needed level in new window on one PC
5. Send few (2-10) requests from application (own-writed, but it can be simplest console solution)

Can it be a problem from UE side? Maybe listener is recognizing HttpClient instance by some signature as untrusted after few requests or smth? Or should I take a look at HttpClient configuring?
