No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

49 líneas
1.4 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Diagnostics;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.ServiceProcess;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using Learun.Loger;
  12. using Learun.Util;
  13. using Microsoft.AspNet.SignalR;
  14. using Microsoft.Owin;
  15. using Microsoft.Owin.Cors;
  16. using Microsoft.Owin.Hosting;
  17. using Owin;
  18. [assembly: OwinStartup(typeof(Quanjiang.DigitalSchool.IMServerService.Startup1))]
  19. namespace Quanjiang.DigitalSchool.IMServerService
  20. {
  21. public partial class QuanjiangDigitalSchollIMService : ServiceBase
  22. {
  23. private Log log = LogFactory.GetLogger("QuanjiangDigitalSchollIMService");
  24. public QuanjiangDigitalSchollIMService()
  25. {
  26. InitializeComponent();
  27. }
  28. protected override void OnStart(string[] args)
  29. {
  30. string SignalRURI = Config.GetValue("IMUrl");
  31. try
  32. {
  33. WebApp.Start(SignalRURI);
  34. log.Info(new { Browser = "QuanjiangDigitalSchollIMService", Content = "服务已启动" });
  35. }
  36. catch (Exception e)
  37. {
  38. log.Error(new { Browser = "QuanjiangDigitalSchollIMService", Content = "服务启动异常" + e.Message+e.StackTrace });
  39. }
  40. }
  41. protected override void OnStop()
  42. {
  43. }
  44. }
  45. }