1 override of RemotePort
Microsoft.AspNetCore.Http (1)
Internal\DefaultConnectionInfo.cs (1)
62public override int RemotePort
8 writes to RemotePort
HttpAbstractions.SampleApp (1)
Program.cs (1)
34connection.RemotePort = 12345;
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
780context.Connection.RemotePort = 43456;
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
324connection.RemotePort = currentValues.RemoteIpAndPort.Port;
Microsoft.AspNetCore.HttpOverrides.Tests (4)
ForwardedHeadersMiddlewareTest.cs (4)
78c.Connection.RemotePort = 99; 136c.Connection.RemotePort = 99; 174c.Connection.RemotePort = 99; 247c.Connection.RemotePort = 99;
Microsoft.AspNetCore.Rewrite.Tests (1)
PatternSegments\RemotePortSegmentTests.cs (1)
17context.HttpContext.Connection.RemotePort = 800;
24 references to RemotePort
AzureAppServicesHostingStartupSample (1)
Startup.cs (1)
30await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine);
AzureAppServicesSample (1)
Startup.cs (1)
41await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine);
DefaultBuilder.SampleApp (1)
Startup.cs (1)
31await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + "\r\n");
HttpOverridesSample (1)
Startup.cs (1)
28await context.Response.WriteAsync($"RemotePort: {context.Connection.RemotePort}\r\n");
IISSample (1)
Startup.cs (1)
55await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine);
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
1948remotePort = context.Connection.RemotePort;
Kestrel.SampleApp (1)
Startup.cs (1)
54logger.LogDebug($"Peer: {connectionFeature.RemoteIpAddress?.ToString()}:{connectionFeature.RemotePort}"
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\JsonTranscodingServerCallContext.cs (3)
88return $"ipv4:{connection.RemoteIpAddress}:{connection.RemotePort}"; 90return $"ipv6:[{connection.RemoteIpAddress}]:{connection.RemotePort}"; 93return $"unknown:{connection.RemoteIpAddress}:{connection.RemotePort}";
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
829Assert.Equal(43456, connectionHttpContext.Connection.RemotePort);
Microsoft.AspNetCore.HttpOverrides (2)
ForwardedHeadersMiddleware.cs (2)
212RemoteIpAndPort = connection.RemoteIpAddress != null ? new IPEndPoint(connection.RemoteIpAddress, connection.RemotePort) : null, 310requestHeaders[_options.OriginalForHeaderName] = new IPEndPoint(connection.RemoteIpAddress, connection.RemotePort).ToString();
Microsoft.AspNetCore.HttpOverrides.Tests (6)
ForwardedHeadersMiddlewareTest.cs (6)
44Assert.Equal(9090, context.Connection.RemotePort); 82Assert.Equal(expectedPort, context.Connection.RemotePort); 140Assert.Equal(expectedPort, context.Connection.RemotePort); 180Assert.Equal(1234, context.Connection.RemotePort); 188Assert.Equal(99, context.Connection.RemotePort); 251Assert.Equal(expectedPort, context.Connection.RemotePort);
Microsoft.AspNetCore.Rewrite (1)
PatternSegments\RemotePortSegment.cs (1)
12return context.HttpContext.Connection.RemotePort.ToString(CultureInfo.InvariantCulture);
NativeIISSample (1)
Startup.cs (1)
49await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine);
Sockets.FunctionalTests (2)
SocketTransportTests.cs (1)
42Assert.Equal(ip.Port, context.Connection.RemotePort);
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
1109RemotePort = connection.RemotePort,
SystemdTestApp (1)
Startup.cs (1)
28logger.LogDebug($"Peer: {connectionFeature.RemoteIpAddress?.ToString()}:{connectionFeature.RemotePort}"