Const.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Bowin.Common.Utility;
  6. namespace EMISOnline.Utility
  7. {
  8. public class Const
  9. {
  10. public static List<string> LOCAL_AUTH_EXCEPTURL
  11. {
  12. get
  13. {
  14. List<string> lurl = new List<string>();
  15. lurl.Add("Content/");
  16. lurl.Add("Doc/");
  17. lurl.Add("bundles/");
  18. lurl.Add("Scripts/");
  19. lurl.Add("/UserVerify");
  20. lurl.Add("/ForgotPassword");
  21. lurl.Add("UploadFile/");
  22. lurl.Add("/MsgShow");
  23. lurl.Add("Account/ChangePassword");
  24. return lurl;
  25. }
  26. }
  27. public static string LOCAL_SETTING_LOGIN_COOKIENAME
  28. {
  29. get
  30. {
  31. try
  32. {
  33. return System.Configuration.ConfigurationManager.AppSettings["logincookieName"];
  34. }
  35. catch
  36. {
  37. return "";
  38. }
  39. }
  40. }
  41. public static string USER_INIT_PASSWORD
  42. {
  43. get { return ("123456").MD5(); }
  44. }
  45. public static string LOCAL_SETTING_UPLOAD_FILEPATH
  46. {
  47. get
  48. {
  49. try
  50. {
  51. return System.Configuration.ConfigurationManager.AppSettings["FileUploadPath"];
  52. }
  53. catch
  54. {
  55. return "";
  56. }
  57. }
  58. }
  59. public static bool SSO_IS_SSO_LOGIN
  60. {
  61. get
  62. {
  63. try
  64. {
  65. return System.Configuration.ConfigurationManager.AppSettings["IsSSOLogin"] == "1";
  66. }
  67. catch (Exception ex)
  68. {
  69. return false;
  70. }
  71. }
  72. }
  73. public static string SSO_HOST
  74. {
  75. get
  76. {
  77. try
  78. {
  79. var ssoHost = System.Configuration.ConfigurationManager.AppSettings["SSOHost"];
  80. if (!ssoHost.EndsWith("/"))
  81. {
  82. ssoHost += "/";
  83. }
  84. return ssoHost;
  85. }
  86. catch (Exception ex)
  87. {
  88. throw new Exception("单点登录配置错误。");
  89. }
  90. }
  91. }
  92. }
  93. }