89 references to Port
aspire (1)
Profiling\ProfileCaptureOptions.cs (1)
108return ((IPEndPoint)listener.LocalEndpoint).Port;
Aspire.Acquisition.Tests (1)
Scripts\Common\ScriptHostFixture.cs (1)
53Port = ((IPEndPoint)portFinder.LocalEndpoint).Port;
Aspire.Components.Common.TestUtilities (1)
ComponentTestUrls.cs (1)
22return ((IPEndPoint)listener.LocalEndpoint).Port;
Aspire.Dashboard (2)
Configuration\ResolvedEndpointInfo.cs (2)
19return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + BindingAddress.Host.ToLowerInvariant() + ":" + EndPoint.Port.ToString(CultureInfo.InvariantCulture); 26return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + "localhost:" + EndPoint.Port.ToString(CultureInfo.InvariantCulture);
Aspire.Dashboard.Tests (8)
Integration\ServerRetryHelper.cs (2)
126var match = unavailableEndpoints.FirstOrDefault(ep => ep.Port == port); 153if (endpoint.Port >= startingPort)
Integration\StartupTests.cs (6)
405Assert.Equal(app.FrontendSingleEndPointAccessor().EndPoint.Port, app.OtlpServiceGrpcEndPointAccessor().EndPoint.Port); 512Assert.Equal(app.FrontendSingleEndPointAccessor().EndPoint.Port, app.OtlpServiceHttpEndPointAccessor().EndPoint.Port); 1069var port = ((IPEndPoint)listener.LocalEndpoint).Port; 1140Assert.NotEqual(0, ipEndPoint.Port);
Aspire.Deployment.EndToEnd.Tests (1)
AksPersistentVolumeDeploymentTests.cs (1)
455return ((System.Net.IPEndPoint)listener.LocalEndpoint).Port;
Aspire.Hosting.Browsers.Tests (1)
BrowserLogsSessionManagerTests.cs (1)
580var browserEndpoint = new Uri($"ws://127.0.0.1:{((IPEndPoint)listener.LocalEndpoint).Port}/devtools/browser/test");
Aspire.Seq.Tests (1)
SeqEndpointCanBeConfigured.cs (1)
79var port = ((IPEndPoint)listener.LocalEndpoint).Port;
Aspire.StackExchange.Redis (2)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (2)
197activity.SetTag(SemanticConventions.AttributeServerPort, ipEndPoint.Port); 199activity.SetTag(SemanticConventions.AttributeNetworkPeerPort, ipEndPoint.Port);
dotnet (1)
Commands\Test\MTP\IPC\HttpTestHostGateway.cs (1)
78return ((IPEndPoint)listener.LocalEndpoint).Port;
dotnet-aot (1)
src\sdk\src\Cli\dotnet\Commands\Test\MTP\IPC\HttpTestHostGateway.cs (1)
78return ((IPEndPoint)listener.LocalEndpoint).Port;
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
566string remoteEndpointAddressString = remoteEndpoint.Address + ":" + remoteEndpoint.Port; 613remoteEndpointAddressString = remote.Address + ":" + remote.Port;
Infrastructure.Tests (1)
PowerShellScripts\DownloadNativeArchivesTests.cs (1)
673var port = ((IPEndPoint)l.LocalEndpoint).Port;
Microsoft.AspNetCore.Components.Testing (2)
Infrastructure\ServerFactory.cs (1)
317var port = ((IPEndPoint)listener.LocalEndpoint).Port;
Infrastructure\ServerInstance.cs (1)
326var port = ((IPEndPoint)listener.LocalEndpoint).Port;
Microsoft.AspNetCore.Http.Connections (1)
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
324connection.RemotePort = currentValues.RemoteIpAndPort.Port;
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\RequestContext.FeatureCollection.cs (2)
822((IHttpConnectionFeature)this).LocalPort = localIPEndPoint.Port; 843((IHttpConnectionFeature)this).RemotePort = remoteIPEndPoint.Port;
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.FeatureCollection.cs (2)
576((IHttpConnectionFeature)this).LocalPort = localIPEndPoint.Port; 597((IHttpConnectionFeature)this).RemotePort = remoteIPEndPoint.Port;
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Common\TestPortHelper.cs (1)
27return ((IPEndPoint)socket.LocalEndPoint).Port;
Deployers\NginxDeployer.cs (1)
47builder.Port = ((IPEndPoint)_portSelector.LocalEndPoint).Port;
Microsoft.AspNetCore.Server.Kestrel.Core (11)
AnyIPListenOptions.cs (4)
34context.Logger.LogTrace(ex, CoreStrings.FailedToBindToIPv6Any, IPEndPoint.Port); 38context.Logger.LogDebug(CoreStrings.FallbackToIPv4Any, IPEndPoint.Port, IPEndPoint.Port); 42EndPoint = new IPEndPoint(IPAddress.Any, IPEndPoint.Port);
DirectTlsEndpoint.cs (1)
53: this((endpoint ?? throw new ArgumentNullException(nameof(endpoint))).Address, endpoint.Port, options)
Internal\Http\HttpProtocol.cs (2)
397RemotePort = remoteEndPoint?.Port ?? 0; 400LocalPort = localEndPoint?.Port ?? 0;
Internal\Infrastructure\HttpUtilities.cs (1)
613var text = "h3=\":" + endpoint.Port.ToString(CultureInfo.InvariantCulture) + "\"; ma=86400";
ListenOptions.cs (1)
236var options = new ListenOptions(new IPEndPoint(address, IPEndPoint!.Port))
LocalhostListenOptions.cs (1)
35return $"{Scheme}://{host}:{IPEndPoint!.Port}";
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.AspNetCore.SignalR.Core (1)
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Util\TcpPortFinder.cs (1)
17return ((IPEndPoint)listener.LocalEndpoint).Port;
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (1)
336_tcpServerAddress = _tcpServerAddress.Replace(":0", string.Format(":{0}", ipEP.Port));
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\AspireService\Helpers\SocketUtilities.cs (2)
68if (endPointUsed is not null && !s_unsafePorts.Contains(endPointUsed.Port)) 70ports[i] = endPointUsed.Port;
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
TcpEndpointProbesServiceTests.cs (1)
126int port = ((IPEndPoint)listener.LocalEndpoint).Port;
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
91port = ip.Port;
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Internal\ServiceEndpointImpl.cs (2)
17IPEndPoint ip when ip.Port == 0 && ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6 => $"[{ip.Address}]", 18IPEndPoint ip when ip.Port == 0 => $"{ip.Address}",
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\LoopbackDnsServer.cs (1)
80_tcpSocket.Bind(new IPEndPoint(IPAddress.Loopback, ((IPEndPoint)_dnsSocket.LocalEndPoint!).Port));
Microsoft.Extensions.ServiceDiscovery.Tests (4)
ServiceEndpointResolverTests.cs (4)
119Assert.Equal(8080, ip.Port); 168Assert.Equal(8080, ip.Port); 205Assert.Equal(8080, ip.Port); 289Assert.Equal(8080, ip.Port);
Microsoft.TestPlatform.CommunicationUtilities (5)
DataCollectionRequestSender.cs (1)
66return endpoint.Port;
DataCollectionTestCaseEventHandler.cs (1)
64return endpoint.Port;
SocketClient.cs (1)
61_tcpClient.ConnectAsync(ipEndPoint.Address, ipEndPoint.Port).ContinueWith(OnServerConnected);
SocketCommunicationManager.cs (1)
187await _tcpClient.ConnectAsync(endpoint.Address, endpoint.Port);
TestRequestSender.cs (1)
168return endpoint.GetIpEndPoint().Port;
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (2)
VsTestConsoleRequestSender.cs (2)
92port = _communicationManager.HostServer(new IPEndPoint(IPAddress.Loopback, 0)).Port; 133port = _communicationManager.HostServer(new IPEndPoint(IPAddress.Loopback, 0)).Port;
System.Net.HttpListener (2)
System\Net\Managed\HttpEndPointManager.cs (1)
175p.Remove(ep.Port);
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
168string base_uri = $"{RequestScheme}://{host}:{LocalEndPoint!.Port}";
System.Net.NameResolution (3)
System\Net\DnsResolver.cs (1)
58_servers[i] = new IPEndPoint(server.Address, server.Port);
System\Net\DnsResolverPal.Managed.cs (2)
833if (servers[i].Port == 0) 856resolved[i] = server.Port == 0 ? new IPEndPoint(server.Address, ResolvConf.DefaultDnsPort) : server;
System.Net.Ping (2)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System.Net.Primitives (5)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\IPEndPoint.cs (3)
20/// Specifies the minimum acceptable value for the <see cref='System.Net.IPEndPoint.Port'/> property. 25/// Specifies the maximum acceptable value for the <see cref='System.Net.IPEndPoint.Port'/> property. 184public override SocketAddress Serialize() => new SocketAddress(Address, Port);
System.Net.Quic (3)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\Quic\Internal\MsQuicHelpers.cs (1)
28port = ipEndPoint.Port;
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
1130return FormatAddress(localEP.Address, localEP.Port); 1134return FormatAddressV6(localEP.Address, localEP.Port);
System.Net.Sockets (6)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\Sockets\Socket.cs (1)
3355remoteEP = new IPEndPoint(addr, ip.Port);
System\Net\Sockets\Socket.Tasks.cs (1)
184Debug.Assert(endPoint.Port == port);
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
802Debug.Assert(existing.Port == port);
System\Net\Sockets\SocketsTelemetry.cs (1)
109int port = ipEndPoint.Port;
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketConnection.cs (1)
439_remoteEndpointAddress = remote.Address + ":" + remote.Port;