Skip to content

Commit 4aab80d

Browse files
committed
Added OSAESercurity to Mobile UI
1 parent 70686a5 commit 4aab80d

4 files changed

Lines changed: 252 additions & 156 deletions

File tree

UI/Web/mobile/MobileMasterPage.master

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@
22

33
<!DOCTYPE html>
44

5-
<html>
6-
<head>
7-
<title>OSA Web Gui
8-
</title>
5+
6+
<head runat="server">
7+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
8+
<title>OSA Web Gui</title>
99
<link rel="stylesheet" href="jquery/jquery.mobile-1.3.1.min.css" />
1010
<script src="jquery/jquery-1.7.2.min.js"></script>
1111
<script src="jquery/jquery.mobile-1.3.1.min.js"></script>
1212
<link rel="shortcut icon" href="favicon.ico"/>
13-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
13+
1414
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
1515
<meta content="telephone=no" name="format-detection"/>
1616
<meta content="address=no" name="format-detection"/>
17-
</head>
18-
<body>
19-
<form id="form1" runat="server">
20-
<div>
21-
<asp:ContentPlaceHolder id="ContentPlaceHolder" runat="server">
22-
23-
</asp:ContentPlaceHolder>
24-
</div>
25-
</form>
26-
</body>
17+
</head>
18+
<html>
19+
<body>
20+
<form id="form1" runat="server">
21+
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></asp:ScriptManager>
22+
<asp:ContentPlaceHolder id="ContentPlaceHolder" runat="server">
23+
</asp:ContentPlaceHolder>
24+
</form>
25+
</body>
2726
</html>

UI/Web/mobile/MobileMasterPage.master.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,30 @@
44
using System.Web;
55
using System.Web.UI;
66
using System.Web.UI.WebControls;
7+
using System.ServiceProcess;
78

89
public partial class mobile_MobileMasterPage : System.Web.UI.MasterPage
910
{
11+
public OSAE.General.OSAELog Log = new OSAE.General.OSAELog("Web Server");
12+
1013
protected void Page_Load(object sender, EventArgs e)
1114
{
15+
//SetSessionTimeout();
16+
}
1217

18+
private void SetSessionTimeout()
19+
{
20+
try
21+
{
22+
int timeout = 0;
23+
if (int.TryParse(OSAE.OSAEObjectPropertyManager.GetObjectPropertyValue("Web Server", "Timeout").Value, out timeout))
24+
Session.Timeout = timeout;
25+
else Session.Timeout = 60;
26+
}
27+
catch (Exception ex)
28+
{
29+
Log.Error("Error setting session timeout", ex);
30+
Response.Redirect("~/error.aspx");
31+
}
1332
}
1433
}

0 commit comments

Comments
 (0)