Default.aspx.cs
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Web;
  7. using System.Web.SessionState;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.HtmlControls;
  11. namespace OThinker.H3.Portal
  12. {
  13. /// <summary>
  14. /// Summary description for _Default.
  15. /// </summary>
  16. public partial class Default : PortalPage
  17. {
  18. protected void Page_Load(object sender, System.EventArgs e)
  19. {
  20.             try
  21.             {
  22.                 OThinker.H3.EngineState state = OThinker.H3.Server.Engine.State;
  23.             }
  24.             catch (System.Net.Sockets.SocketException ex)
  25.             {
  26.                 this.Response.Write("<BR>");
  27.                 this.Response.Write(
  28.                     "出错了!" + "<BR>" +
  29.                     "请检查:" + "<BR>" +
  30.                     "1、工作流服务器是否启动。" + "<BR>" +
  31.                     ex.StackTrace.Replace("r", "<BR>"));
  32.                 return;
  33.             }
  34.             catch (System.Reflection.TargetInvocationException ex)
  35.             {
  36.                 this.Response.Write("<BR>");
  37.                 this.Response.Write(
  38.                     "出错了!请检查:" + "<BR>" +
  39.                     "1、数据库是否启动;" + "<BR>" +
  40.                     "2、数据库连接设置是否正确;" + "<BR>" +
  41.                     "3、是否可以从本机连接到数据库上。" + "<BR>" +
  42.                     ex.StackTrace.Replace("r", "<BR>"));
  43.                 return;
  44.             }
  45.             try
  46.             {
  47.                 this.Response.Write(this.UserValidator.UserName);
  48.             }
  49.             catch (Exception ex)
  50.             {
  51.                 this.Response.Write("<BR>");
  52.                 this.Response.Write(
  53.                     "出错了!请检查:<BR>" +
  54.                     "1、活动目录设置是否正确,包括活动目录地址,登陆名和密码;" + "<BR>" +
  55.                     "2、该用户是否有权限访问活动目录;" + "<BR>" +
  56.                     "3、IIS是否设置为集成Windows身份验证,并禁止了匿名;" + "<BR>" +
  57.                     ex.StackTrace.Replace("r", "<BR>"));
  58.                 return;
  59.             }
  60.             try
  61.             {
  62.                 if (OThinker.H3.Server.Engine.SettingManager.Initialized)
  63.                 {
  64.                     this.Response.Redirect("Main.htm");
  65.                 }
  66.                 else if (OThinker.H3.Server.Engine.Organization.IsAdministrator(this.UserValidator.UserID))
  67.                 {
  68.                     this.Response.Redirect(PageName_Settings);
  69.                 }
  70.                 else
  71.                 {
  72.                     this.Response.Redirect(PageName_Login);
  73.                 }
  74.             }
  75.             catch
  76.             {
  77.             }
  78. }
  79. #region Web Form Designer generated code
  80. override protected void OnInit(EventArgs e)
  81. {
  82. //
  83. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  84. //
  85. InitializeComponent();
  86. base.OnInit(e);
  87. }
  88. /// <summary>
  89. /// Required method for Designer support - do not modify
  90. /// the contents of this method with the code editor.
  91. /// </summary>
  92. private void InitializeComponent()
  93. {    
  94. }
  95. #endregion
  96. }
  97. }