You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
501 B

  1. using CustomerPortalV2.Common.Configs;
  2. using Microsoft.AspNetCore.Http;
  3. namespace CustomerPortalV2.Common.Helper
  4. {
  5. public static class Utilities
  6. {
  7. public static string GetIpAddressv2(HttpContext httpContext)
  8. {
  9. var ipDetails = httpContext.Connection.RemoteIpAddress;
  10. return ipDetails.ToString();
  11. }
  12. public static string ReadAppSettings(string key)
  13. {
  14. return ConfigurationManager.AppSettings[key];
  15. }
  16. }
  17. }