Hi,
using .netcore 2.1 had code below working in 2.2 a few months work back
have variable badIp
How can we get message returned to screen when badIp = true
when have badIp = false then shows data entry as expected
Below still works on local pc but doesn't show when publish on server no message returned to screen when use chrome.
badIp = true; if (badIp) { _logger.LogInformation( " Please contact IT to add your ip address to list of valid ip addresses. Forbidden Request from Remote IP address: {RemoteIp}", remoteIp); context.Result = new StatusCodeResult(200); string valueString = "Only whitelisted I.P. Addresses may access this application." +"\r\n" +"\r\n" +"Please contact IT team to determine if your IP address can be added for access"; context.HttpContext.Response.WriteAsync(valueString); return; }