Do Dev Tunnels Have an HTTP Timeout Issue?

Tony Pitman 81 Reputation points
2025-01-17T14:50:58.46+00:00

Using a dev tunnel to connect a Mac client app to an ASP.NET service running on a PC has raised a timeout issue.

One API call takes about 70 seconds to complete, but when the client runs on the Mac via the dev tunnel, an HTTP timeout occurs after 60 seconds. Although the server method completes successfully 10 seconds later, the client disconnects due to the timeout.

In testing, running the client on Windows without the dev tunnel and connecting directly to localhost allows it to wait for the full 70 seconds and receive the successful result.

If the client is run on Windows using the dev tunnel instead of connecting directly to localhost on the dev PC, it also times out after 60 seconds, similar to running the client on the Mac.

It appears that the dev tunnel is causing the timeout at 60 seconds.

Unfortunately I don't have a good way to make the process take less time.

Is there a way to resolve this timeout issue?

Developer technologies | ASP.NET | ASP.NET API
{count} vote

1 answer

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 1,020 Reputation points Microsoft External Staff
    2025-07-07T09:28:23.6033333+00:00

    Hello @Tony Pitman ,

    Thank you for your question regarding HTTP timeouts when using Dev Tunnels to connect a Mac client app to an ASP.NET service hosted on a Windows PC.

    Based on your description, you're encountering a timeout issue when making long-running API calls (approximately 70 seconds) through the dev tunnel.

    Dev tunnels currently have a fixed timeout limit of 60 seconds. This limit cannot be configured or extended at this time. Therefore, any API call that takes longer than 60 seconds will result in a timeout error.

    Here are some recommended workarounds

    1. Optimize the API Call:

    Consider using caching or breaking the task into smaller chunks to reduce execution time.

    Offload long-running operations to background tasks and return a status or job ID to the client.

    1. Avoid Dev Tunnels for Long-Running Requests:

    For development scenarios involving long-running requests, consider using localhost or a local network connection instead of dev tunnels.

    1. Feature Request:

    You may submit a feature request on the Visual Studio GitHub repository to support configurable timeout settings.

    Hope my recommendations helpful.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.