Closed ys0d closed 2 months ago
cc @karolz-ms @danegsta
@ys0d that error seems to indicate that you have a proxy configured that’s returning errors for Aspire traffic. That 403 error code indicates a forbidden request (usually due to missing order incorrect credentials).
@danegsta I have checked proxy configuration and it looks I don't have one.
PS C:\Users\YS0D> netsh winhttp show proxy
Current WinHTTP proxy settings:
Direct access (no proxy server).
But i work under a VPN connection, which maybe causes that problem. The question is how to fix it? Which settings have to be adjusted and permission granted?
It's entirely possible the VPN/proxy (the connection is definitely going through a proxy server as the error message you're getting is a low level .NET proxy connection error, not something specific to Aspire) doesn't support self-signed certificates. By default, Aspire uses https traffic on localhost using the .NET dev cert, which is a per-machine self-signed certificate restricted to localhost.
You may want to try running the http launch profile (instead of the default https profile). For Visual Studio, you can simply change the target launch profile dropdown. From the command line, you'll need to add --launch-profile http
to your run command arguments.
Thanks for explanations. After an investigation I can agree it goes through a proxy, probably because of ipv6 is being used. Looking at PAC file I see that 127.* addresses are configured to go directly but it is not the case for ::1 addresses. Is it possible to configure Aspire services to use ipv4?
using an http profile produces the same result:
info: Aspire.Hosting.DistributedApplication[0]
Login to the dashboard at http://localhost:15261/login?t=407234c531f4a953cceefb6e2f749509
crit: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Watch task over kubernetes Service resources terminated unexpectedly. Check to ensure dcpd process is running.
System.Net.Http.HttpRequestException: The proxy tunnel request to proxy 'http://webproxy.xxxxxx.net:8080/' failed with status code '403'."
Not in the current 8.0 GA release, but in main branch support was added for an environment variable to control IP binding preferences. Setting DCP_IP_VERSION_PREFERENCE=ipv4 will cause ipv4 to be preferred for any service bindings. This will ship with the upcoming 8.1 Aspire release.
This appears to be done in 8.1, going to close, re-open if the issue continues after acquiring 8.1
Running a starter aspire solution I get the following error.
I have created the solution from the visual studio aspire template and I haven't made any changes.
What could be done to fix it?