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.

23 lines
813 B

1 year ago
  1. using log4net;
  2. using System.Net.Http;
  3. using System.Web;
  4. using System.Web.Http;
  5. using JsonRx.Helper;
  6. namespace JsonRx
  7. {
  8. public class WebApiApplication : System.Web.HttpApplication
  9. {
  10. private static readonly ILog log = LogManager.GetLogger(typeof(WebApiApplication));
  11. protected void Application_Start()
  12. {
  13. log4net.Config.XmlConfigurator.Configure();
  14. log.Info("JME REST API Application started.");
  15. //HttpRequestMessage httpRequestMessage = HttpContext.Current.Items["MS_HttpRequestMessage"] as HttpRequestMessage;
  16. //log4net.GlobalContext.Properties["User_IP"] = httpRequestMessage.GetClientIpAddress();
  17. UnityConfig.RegisterComponents();
  18. GlobalConfiguration.Configure(WebApiConfig.Register);
  19. }
  20. }
  21. }