Repository navigation
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
This issue has been occurring since 13.2.0.
When a Windows username contains non-ASCII characters, the following issue can occur.
fail: Aspire.Hosting.Backchannel.AuxiliaryBackchannelService[0]
Error in auxiliary backchannel service.
System.ArgumentOutOfRangeException: The path 'C:\Users\TanakaTarou(田中太郎)\.aspire\cli\backchannels\auxi.sock.3a579b6853b74a71.6b473261d1bc.24908' is of an invalid length for use with domain sockets on this platform. The length must be between 1 and 108 characters, inclusive. (Parameter 'path')
Actual value was C:\Users\TanakaTarou(田中太郎)\.aspire\cli\backchannels\auxi.sock.3a579b6853b74a71.6b473261d1bc.24908.
at System.Net.Sockets.UnixDomainSocketEndPoint..ctor(String path, String boundFileName)
at Aspire.Hosting.Backchannel.AuxiliaryBackchannelService.ExecuteAsync(CancellationToken stoppingToken) in /_/src/Aspire.Hosting/Backchannel/AuxiliaryBackchannelService.cs:line 79
- In Windows environments, the maximum username length is 20 characters.
- This 20-character limit includes non-ASCII characters, so it does not refer to the 20-byte limit in UTF-8 encoding.
- The maximum length for UnixDomainSocketEndPoint is 108 characters.
- However, reaching 108 characters is only possible when there are no non-ASCII characters in the path.
- If the path exceeds 108 bytes in UTF-8 encoding, an ArgumentOutOfRangeException will be thrown.
- Related: Use home-based CLI cache and randomized socket paths #15346
Expected Behavior
- No errors should occur.
- The backchannel is created successfully.
Steps To Reproduce
- Create a Windows machine with a username that contains non-ASCII characters.
- It can be reproduced in the following simple situation
var path = "C:\\Users\\TanakaTarou(田中太郎)\\.aspire\\cli\\backchannels\\auxi.sock.3a579b6853b74a71.fee67dd76369.26688";
try
{
Console.WriteLine(path.Length); // 97
Console.WriteLine(Encoding.UTF8.GetByteCount(path)); // 109
_ = new UnixDomainSocketEndPoint(path);
}
catch (ArgumentOutOfRangeException ex)
{
Console.WriteLine(ex.Message);
// The path 'C:\Users\TanakaTarou(田中太郎)\.aspire\cli\backchannels\auxi.sock.3a579b6853b74a71.fee67dd76369.26688' is of an invalid length for use with domain sockets on this platform. The length must be between 1 and 108 characters, inclusive. (Parameter 'path')
// Actual value was C:\Users\TanakaTarou(田中太郎)\.aspire\cli\backchannels\auxi.sock.3a579b6853b74a71.fee67dd76369.26688.
}Exceptions (if any)
No response
.NET Version info
10.0.201
Anything else?
No response
Reacted by Yuta Matsumura, Yūya Hoshino(星野 雄哉), neguse, tomokusaba, Kento.Yamada, Hoclyn, yamada koji, prozolic, Mana, k2kkrm and 1 more
Metadata
Metadata
Assignees
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Activity
[-]Backchannel path is too long from v13.2.0[/-][+]Backchannel path is too long[/+]joperezr commentedon Apr 30, 2026
As part of triage cleanup ahead of the 13.3 release, this issue is being moved to the Backlog milestone. If you believe it should remain in 13.3, feel free to re-add to the milestone and leave a comment here why it should not be punted.
nenoNaninu commentedon May 1, 2026
Jose Perez Rodriguez (@joperezr)
I’d like to request that the team reconsider this issue for the 13.3 milestone.
For our team, this is currently a blocker for upgrading from v13.1 to v13.2 or later. As long as this issue remains unresolved, we cannot adopt v13.2 and have no practical choice but to stay on v13.1. This is especially unfortunate because v13.2 includes several very attractive improvements, but this issue prevents us from using them.
I also do not think this should be treated merely as an edge case. In many companies, developers do not have the freedom to choose their Windows usernames; they must use the usernames assigned by the company. As a result, especially in non-ASCII-speaking regions, even developers may have non-ASCII characters in their Windows usernames.
Given that Aspire is used by international users, and its adoption is likely to continue growing, I believe more users will inevitably run into this problem over time.
Again, I would strongly appreciate it if this could be fixed in v13.3 rather than being left in the backlog.
tomokusaba commentedon May 1, 2026
Personally, I can work around this issue. However, enterprise users in Japan are generally struggling with it. Unless this is fixed, we cannot effectively promote broader adoption of Aspire among users in Japan.
hendrikmennen commentedon May 4, 2026
This is not just for japanese people. When you run dotnet inside a distrobox with a different home path this will happen too
davidfowl commentedon May 4, 2026
It's a pretty fundamental limitation with UDS and the length. We'll need to have an alternative solution for this but it's not quick fix (Even with AI).
joperezr commentedon May 4, 2026
Karol Zadora-Przylecki (@karolz-ms) this is an interesting one to look at for 13.4.
karolz-ms commentedon May 14, 2026
The socket path limit is 108 bytes on Windows and Linux and only 103 bytes on Mac, and that includes null byte at the end. And that is bytes, not runes/Unicode characters.
Use shorter form of backchannel path
Use shorter form of backchannel path
Use shorter form of backchannel path
Use shorter form of backchannel path
Use shorter form of backchannel path
Shorten backchannel socket paths (microsoft#17226)