public static void recordUserVariables()
{
string sessionId = System.Web.HttpContext.Current.Session.SessionID,
sameSessionId = UtilFns.Common.GetSessionVariable("userSessionId");
bool recordSession = false;
/// The sess vars are apparently not alwas set when the user first gets to the portal
string temp_ss_Username_aspx = UtilFns.Common.GetSessionVariable("Username_aspx");
string repeatSessionRecording = UtilFns.Common.GetSessionVariable("repeatSessionRecording");
/// The sess vars are apparently not alwas set when the user first gets to the portal
/// so set a flag to repeat this when they are present
if (String.IsNullOrEmpty(temp_ss_Username_aspx))
{
UtilFns.Common.SetSessionVariable("repeatSessionRecording", "1");
}
if (repeatSessionRecording == "1")
{
recordSession = true;
UtilFns.Common.SetSessionVariable("repeatSessionRecording", "0");
}
if (String.IsNullOrEmpty(sameSessionId))
{
recordSession = true;
UtilFns.Common.SetSessionVariable("userSessionId", sessionId);
}
else if (sameSessionId != sessionId)
{
recordSession = true;
}
if (recordSession)
{
/// For recording user values, called from teh home page
string ss_Username_aspx = "",
ss_Email_aspx = "",
ss_IsAdmin_aspx = "",
ss_ActualUsername_aspx = "",
ss_ActualIsAdmin_aspx = "",
ss_FullName2_aspx = "",
ss_HRAdmin = "",
ss_eRF_Agency = "",
ss_BudEntryAlways = "",
sv_APPL_MD_PATH = "",
sv_APPL_PHYSICAL_PATH = "",
sv_AUTH_TYPE = "",
sv_AUTH_USER = "",
sv_INSTANCE_META_PATH = "",
sv_LOCAL_ADDR = "",
sv_LOGON_USER = "",
sv_REMOTE_ADDR = "",
sv_REMOTE_HOST = "",
sv_REMOTE_USER = "",
sv_REQUEST_METHOD = "",
sv_SCRIPT_NAME = "",
sv_SERVER_NAME = "",
sv_SERVER_PORT = "",
sv_SERVER_PROTOCOL = "",
sv_SERVER_SOFTWARE = "",
sv_URL = "",
sv_HTTP_CONNECTION = "",
sv_HTTP_ACCEPT = "",
sv_HTTP_ACCEPT_ENCODING = "",
sv_HTTP_ACCEPT_LANGUAGE = "",
sv_HTTP_COOKIE = "",
sv_HTTP_HOST = "",
sv_HTTP_USER_AGENT = "",
brwsr_computer_name = "",
brwsr_MachineName = "",
brwsr_Type = "",
brwsr_Browser = "",
brwsr_Version = "",
brwsr_MajorVersion = "",
brwsr_MinorVersion = "",
brwsr_Platform = "",
brwsr_Beta = "",
brwsr_Crawler = "",
brwsr_AOL = "",
brwsr_Win16 = "",
brwsr_Win32 = "",
brwsr_Frames = "",
brwsr_Tables = "",
brwsr_Cookies = "",
brwsr_VBScript = "",
brwsr_EcmaScriptVersion = "",
brwsr_JavaApplets = "",
brwsr_ActiveXControls = "",
brwsr_JavaScriptVersion = "";
try
{
ss_Username_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("Username_aspx")))?
UtilFns.Common.GetSessionVariable("Username_aspx"): "";
ss_Email_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("Email_aspx")))?
UtilFns.Common.GetSessionVariable("Email_aspx"): "";
ss_IsAdmin_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("IsAdmin_aspx")))?
UtilFns.Common.GetSessionVariable("IsAdmin_aspx"): "";
ss_ActualUsername_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("Username_aspx")))?
UtilFns.Common.GetSessionVariable("Username_aspx"): "";
ss_ActualIsAdmin_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("ActualIsAdmin_aspx")))?
UtilFns.Common.GetSessionVariable("ActualIsAdmin_aspx"): "";
ss_FullName2_aspx = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("FullName2_aspx")))?
UtilFns.Common.GetSessionVariable("FullName2_aspx"): "";
ss_HRAdmin = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("HRAdmin")))?
UtilFns.Common.GetSessionVariable("HRAdmin"): "";
ss_eRF_Agency = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("eRF_Agency")))?
UtilFns.Common.GetSessionVariable("eRF_Agency"): "";
ss_BudEntryAlways = (!String.IsNullOrEmpty(UtilFns.Common.GetSessionVariable("BudEntryAlways")))?
UtilFns.Common.GetSessionVariable("BudEntryAlways"): "";
sv_APPL_MD_PATH = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("APPL_MD_PATH")))?
UtilFns.Common.GetServerVariable("APPL_MD_PATH"): "";
sv_APPL_PHYSICAL_PATH = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("APPL_PHYSICAL_PATH")))?
UtilFns.Common.GetServerVariable("APPL_PHYSICAL_PATH"): "";
sv_AUTH_TYPE = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("AUTH_TYPE")))?
UtilFns.Common.GetServerVariable("AUTH_TYPE"): "";
sv_AUTH_USER = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("AUTH_USER")))?
UtilFns.Common.GetServerVariable("AUTH_USER"): "";
sv_INSTANCE_META_PATH = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("INSTANCE_META_PATH")))?
UtilFns.Common.GetServerVariable("INSTANCE_META_PATH"): "";
sv_LOCAL_ADDR = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("LOCAL_ADDR")))?
UtilFns.Common.GetServerVariable("LOCAL_ADDR"): "";
sv_LOGON_USER = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("LOGON_USER")))?
UtilFns.Common.GetServerVariable("LOGON_USER"): "";
sv_REMOTE_ADDR = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("REMOTE_ADDR")))?
UtilFns.Common.GetServerVariable("REMOTE_ADDR"): "";
sv_REMOTE_HOST = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("REMOTE_HOST")))?
UtilFns.Common.GetServerVariable("REMOTE_HOST"): "";
sv_REMOTE_USER = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("REMOTE_USER")))?
UtilFns.Common.GetServerVariable("REMOTE_USER"): "";
sv_REQUEST_METHOD = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("REQUEST_METHOD")))?
UtilFns.Common.GetServerVariable("REQUEST_METHOD"): "";
sv_SCRIPT_NAME = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("SCRIPT_NAME")))?
UtilFns.Common.GetServerVariable("SCRIPT_NAME"): "";
sv_SERVER_NAME = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("SERVER_NAME")))?
UtilFns.Common.GetServerVariable("SERVER_NAME"): "";
sv_SERVER_PORT = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("SERVER_PORT")))?
UtilFns.Common.GetServerVariable("SERVER_PORT"): "";
sv_SERVER_PROTOCOL = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("SERVER_PROTOCOL")))?
UtilFns.Common.GetServerVariable("SERVER_PROTOCOL"): "";
sv_SERVER_SOFTWARE = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("SERVER_SOFTWARE")))?
UtilFns.Common.GetServerVariable("SERVER_SOFTWARE"): "";
sv_URL = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("URL")))?
UtilFns.Common.GetServerVariable("URL"): "";
sv_HTTP_CONNECTION = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_CONNECTION")))?
UtilFns.Common.GetServerVariable("HTTP_CONNECTION"): "";
sv_HTTP_ACCEPT = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_ACCEPT")))?
UtilFns.Common.GetServerVariable("HTTP_ACCEPT"): "";
sv_HTTP_ACCEPT_ENCODING = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_ACCEPT_ENCODING")))?
UtilFns.Common.GetServerVariable("HTTP_ACCEPT_ENCODING"): "";
sv_HTTP_ACCEPT_LANGUAGE = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_ACCEPT_LANGUAGE")))?
UtilFns.Common.GetServerVariable("HTTP_ACCEPT_LANGUAGE"): "";
sv_HTTP_COOKIE = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_COOKIE")))?
UtilFns.Common.GetServerVariable("HTTP_COOKIE"): "";
sv_HTTP_HOST = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_HOST")))?
UtilFns.Common.GetServerVariable("HTTP_HOST"): "";
sv_HTTP_USER_AGENT = (!String.IsNullOrEmpty(UtilFns.Common.GetServerVariable("HTTP_USER_AGENT")))?
UtilFns.Common.GetServerVariable("HTTP_USER_AGENT"): "";
string[] computer_name = System.Net.Dns.GetHostEntry
(HttpContext.Current.Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
brwsr_computer_name = (!String.IsNullOrEmpty(computer_name[0].ToString()))?
computer_name[0].ToString(): "";
brwsr_MachineName = (!String.IsNullOrEmpty(System.Environment.MachineName))?
System.Environment.MachineName: "";
System.Web.HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;
brwsr_Type = (!String.IsNullOrEmpty(browser.Type.ToString()))?
browser.Type.ToString(): "";
brwsr_Browser = (!String.IsNullOrEmpty(browser.Browser.ToString()))?
browser.Browser.ToString(): "";
brwsr_Version = (!String.IsNullOrEmpty(browser.Version.ToString()))?
browser.Version.ToString(): "";
brwsr_MajorVersion = (!String.IsNullOrEmpty(browser.MajorVersion.ToString()))?
browser.MajorVersion.ToString(): "";
brwsr_MinorVersion = (!String.IsNullOrEmpty(browser.MinorVersion.ToString()))?
browser.MinorVersion.ToString(): "";
brwsr_Platform = (!String.IsNullOrEmpty(browser.Platform.ToString()))?
browser.Platform.ToString(): "";
brwsr_Beta = (!String.IsNullOrEmpty(browser.Beta.ToString()))?
browser.Beta.ToString(): "";
brwsr_Crawler = (!String.IsNullOrEmpty(browser.Crawler.ToString()))?
browser.Crawler.ToString(): "";
brwsr_AOL = (!String.IsNullOrEmpty(browser.AOL.ToString()))?
browser.AOL.ToString(): "";
brwsr_Win16 = (!String.IsNullOrEmpty(browser.Win16.ToString()))?
browser.Win16.ToString(): "";
brwsr_Win32 = (!String.IsNullOrEmpty(browser.Win32.ToString()))?
browser.Win32.ToString(): "";
brwsr_Frames = (!String.IsNullOrEmpty(browser.Frames.ToString()))?
browser.Frames.ToString(): "";
brwsr_Tables = (!String.IsNullOrEmpty(browser.Tables.ToString()))?
browser.Tables.ToString(): "";
brwsr_Cookies = (!String.IsNullOrEmpty(browser.Cookies.ToString()))?
browser.Cookies.ToString(): "";
brwsr_VBScript = (!String.IsNullOrEmpty(browser.VBScript.ToString()))?
browser.VBScript.ToString(): "";
brwsr_EcmaScriptVersion = (!String.IsNullOrEmpty(browser.EcmaScriptVersion.ToString()))?
browser.EcmaScriptVersion.ToString(): "";
brwsr_JavaApplets = (!String.IsNullOrEmpty(browser.JavaApplets.ToString()))?
browser.JavaApplets.ToString(): "";
brwsr_ActiveXControls = (!String.IsNullOrEmpty(browser.ActiveXControls.ToString()))?
browser.ActiveXControls.ToString(): "";
brwsr_JavaScriptVersion = (!String.IsNullOrEmpty(browser["JavaScriptVersion"].ToString()))?
browser["JavaScriptVersion"].ToString(): "";
string sSQL = @"foo.insBarBrowserValues "
+ " @sessionId = '" + sessionId + "'"
+ ", @ss_Username_aspx = '" + ss_Username_aspx + "'"
+ ", @ss_Email_aspx = '" + ss_Email_aspx + "'"
+ ", @ss_IsAdmin_aspx = '" + ss_IsAdmin_aspx + "'"
+ ", @ss_ActualUsername_aspx = '" + ss_ActualUsername_aspx + "'"
+ ", @ss_ActualIsAdmin_aspx = '" + ss_ActualIsAdmin_aspx + "'"
+ ", @ss_FullName2_aspx = '" + ss_FullName2_aspx + "'"
+ ", @ss_HRAdmin = '" + ss_HRAdmin + "'"
+ ", @ss_eRF_Agency = '" + ss_eRF_Agency + "'"
+ ", @ss_BudEntryAlways = '" + ss_BudEntryAlways + "'"
+ ", @sv_APPL_MD_PATH = '" + sv_APPL_MD_PATH + "'"
+ ", @sv_APPL_PHYSICAL_PATH = '" + sv_APPL_PHYSICAL_PATH + "'"
+ ", @sv_AUTH_TYPE = '" + sv_AUTH_TYPE + "'"
+ ", @sv_AUTH_USER = '" + sv_AUTH_USER + "'"
+ ", @sv_INSTANCE_META_PATH = '" + sv_INSTANCE_META_PATH + "'"
+ ", @sv_LOCAL_ADDR = '" + sv_LOCAL_ADDR + "'"
+ ", @sv_LOGON_USER = '" + sv_LOGON_USER + "'"
+ ", @sv_REMOTE_ADDR = '" + sv_REMOTE_ADDR + "'"
+ ", @sv_REMOTE_HOST = '" + sv_REMOTE_HOST + "'"
+ ", @sv_REMOTE_USER = '" + sv_REMOTE_USER + "'"
+ ", @sv_REQUEST_METHOD = '" + sv_REQUEST_METHOD + "'"
+ ", @sv_SCRIPT_NAME = '" + sv_SCRIPT_NAME + "'"
+ ", @sv_SERVER_NAME = '" + sv_SERVER_NAME + "'"
+ ", @sv_SERVER_PORT = '" + sv_SERVER_PORT + "'"
+ ", @sv_SERVER_PROTOCOL = '" + sv_SERVER_PROTOCOL + "'"
+ ", @sv_SERVER_SOFTWARE = '" + sv_SERVER_SOFTWARE + "'"
+ ", @sv_URL = '" + sv_URL + "'"
+ ", @sv_HTTP_CONNECTION = '" + sv_HTTP_CONNECTION + "'"
+ ", @sv_HTTP_ACCEPT = '" + sv_HTTP_ACCEPT + "'"
+ ", @sv_HTTP_ACCEPT_ENCODING = '" + sv_HTTP_ACCEPT_ENCODING + "'"
+ ", @sv_HTTP_ACCEPT_LANGUAGE = '" + sv_HTTP_ACCEPT_LANGUAGE + "'"
+ ", @sv_HTTP_COOKIE = '" + sv_HTTP_COOKIE + "'"
+ ", @sv_HTTP_HOST = '" + sv_HTTP_HOST + "'"
+ ", @sv_HTTP_USER_AGENT = '" + sv_HTTP_USER_AGENT + "'"
+ ", @brwsr_computer_name = '" + brwsr_computer_name + "'"
+ ", @brwsr_MachineName = '" + brwsr_MachineName + "'"
+ ", @brwsr_Type = '" + brwsr_Type + "'"
+ ", @brwsr_Browser = '" + brwsr_Browser + "'"
+ ", @brwsr_Version = '" + brwsr_Version + "'"
+ ", @brwsr_MajorVersion = '" + brwsr_MajorVersion + "'"
+ ", @brwsr_MinorVersion = '" + brwsr_MinorVersion + "'"
+ ", @brwsr_Platform = '" + brwsr_Platform + "'"
+ ", @brwsr_Beta = '" + brwsr_Beta + "'"
+ ", @brwsr_Crawler = '" + brwsr_Crawler + "'"
+ ", @brwsr_AOL = '" + brwsr_AOL + "'"
+ ", @brwsr_Win16 = '" + brwsr_Win16 + "'"
+ ", @brwsr_Win32 = '" + brwsr_Win32 + "'"
+ ", @brwsr_Frames = '" + brwsr_Frames + "'"
+ ", @brwsr_Tables = '" + brwsr_Tables + "'"
+ ", @brwsr_Cookies = '" + brwsr_Cookies + "'"
+ ", @brwsr_VBScript = '" + brwsr_VBScript + "'"
+ ", @brwsr_EcmaScriptVersion = '" + brwsr_EcmaScriptVersion + "'"
+ ", @brwsr_JavaApplets = '" + brwsr_JavaApplets + "'"
+ ", @brwsr_ActiveXControls = '" + brwsr_ActiveXControls + "'"
+ ", @brwsr_JavaScriptVersion = '" + brwsr_JavaScriptVersion + "'" ;
DataUtilities.utilSQL.DBExecNonQueryText(sSQL, "foo");
}
catch (Exception ex)
{
UtilFns.Common.LogAll("Error Recording User Values", ex.ToString(), UtilFns.Common.GetCurrentPageName(),
"Session ID: " + sessionId, true);
}
finally
{
;
}
}
}
--DROP TABLE foo.userBarValues
--USE foo
--GO
--CREATE TABLE foo.userBarValues (
-- ident BIGINT IDENTITY (1, 1)
--, sessionId VARCHAR(128) NOT NULL
--, ss_Username_aspx VARCHAR(128)
--, ss_Email_aspx VARCHAR(128)
--, ss_IsAdmin_aspx VARCHAR(2)
--, ss_ActualUsername_aspx VARCHAR(128)
--, ss_ActualIsAdmin_aspx VARCHAR(2)
--, ss_FullName2_aspx VARCHAR(128)
--, ss_HRAdmin VARCHAR(2)
--, ss_eRF_Agency VARCHAR(2)
--, ss_BudEntryAlways VARCHAR(2)
--, sv_APPL_MD_PATH VARCHAR(128)
--, sv_APPL_PHYSICAL_PATH VARCHAR(128)
--, sv_AUTH_TYPE VARCHAR(128)
--, sv_AUTH_USER VARCHAR(128)
--, sv_INSTANCE_META_PATH VARCHAR(128)
--, sv_LOCAL_ADDR VARCHAR(32)
--, sv_LOGON_USER VARCHAR(128)
--, sv_REMOTE_ADDR VARCHAR(32)
--, sv_REMOTE_HOST VARCHAR(32)
--, sv_REMOTE_USER VARCHAR(128)
--, sv_REQUEST_METHOD VARCHAR(16)
--, sv_SCRIPT_NAME VARCHAR(128)
--, sv_SERVER_NAME VARCHAR(128)
--, sv_SERVER_PORT VARCHAR(8)
--, sv_SERVER_PROTOCOL VARCHAR(16)
--, sv_SERVER_SOFTWARE VARCHAR(128)
--, sv_URL VARCHAR(128)
--, sv_HTTP_CONNECTION VARCHAR(128)
--, sv_HTTP_ACCEPT VARCHAR(1024)
--, sv_HTTP_ACCEPT_ENCODING VARCHAR(128)
--, sv_HTTP_ACCEPT_LANGUAGE VARCHAR(128)
--, sv_HTTP_COOKIE VARCHAR(1024)
--, sv_HTTP_HOST VARCHAR(128)
--, sv_HTTP_USER_AGENT VARCHAR(1024)
--, brwsr_computer_name VARCHAR(128)
--, brwsr_MachineName VARCHAR(128)
--, brwsr_Type VARCHAR(128)
--, brwsr_Browser VARCHAR(128)
--, brwsr_Version VARCHAR(16)
--, brwsr_MajorVersion VARCHAR(16)
--, brwsr_MinorVersion VARCHAR(16)
--, brwsr_Platform VARCHAR(128)
--, brwsr_Beta VARCHAR(16)
--, brwsr_Crawler VARCHAR(16)
--, brwsr_AOL VARCHAR(16)
--, brwsr_Win16 VARCHAR(16)
--, brwsr_Win32 VARCHAR(16)
--, brwsr_Frames VARCHAR(16)
--, brwsr_Tables VARCHAR(16)
--, brwsr_Cookies VARCHAR(16)
--, brwsr_VBScript VARCHAR(16)
--, brwsr_EcmaScriptVersion VARCHAR(16)
--, brwsr_JavaApplets VARCHAR(16)
--, brwsr_ActiveXControls VARCHAR(16)
--, brwsr_JavaScriptVersion VARCHAR(16)
--, crDate DATETIME DEFAULT GETDATE()
--)
USE PerformanceFoo
GO
CREATE PROC Foo.insBarBrowserValues (
@sessionId VARCHAR(128)
, @ss_Username_aspx VARCHAR(128)
, @ss_Email_aspx VARCHAR(128)
, @ss_IsAdmin_aspx VARCHAR(2)
, @ss_ActualUsername_aspx VARCHAR(128)
, @ss_ActualIsAdmin_aspx VARCHAR(2)
, @ss_FullName2_aspx VARCHAR(128)
, @ss_HRAdmin VARCHAR(2)
, @ss_eRF_Agency VARCHAR(2)
, @ss_BudEntryAlways VARCHAR(2)
, @sv_APPL_MD_PATH VARCHAR(128)
, @sv_APPL_PHYSICAL_PATH VARCHAR(128)
, @sv_AUTH_TYPE VARCHAR(128)
, @sv_AUTH_USER VARCHAR(128)
, @sv_INSTANCE_META_PATH VARCHAR(128)
, @sv_LOCAL_ADDR VARCHAR(32)
, @sv_LOGON_USER VARCHAR(128)
, @sv_REMOTE_ADDR VARCHAR(32)
, @sv_REMOTE_HOST VARCHAR(32)
, @sv_REMOTE_USER VARCHAR(128)
, @sv_REQUEST_METHOD VARCHAR(16)
, @sv_SCRIPT_NAME VARCHAR(128)
, @sv_SERVER_NAME VARCHAR(128)
, @sv_SERVER_PORT VARCHAR(8)
, @sv_SERVER_PROTOCOL VARCHAR(16)
, @sv_SERVER_SOFTWARE VARCHAR(128)
, @sv_URL VARCHAR(128)
, @sv_HTTP_CONNECTION VARCHAR(128)
, @sv_HTTP_ACCEPT VARCHAR(1024)
, @sv_HTTP_ACCEPT_ENCODING VARCHAR(128)
, @sv_HTTP_ACCEPT_LANGUAGE VARCHAR(128)
, @sv_HTTP_COOKIE VARCHAR(1024)
, @sv_HTTP_HOST VARCHAR(128)
, @sv_HTTP_USER_AGENT VARCHAR(1024)
, @brwsr_computer_name VARCHAR(128)
, @brwsr_MachineName VARCHAR(128)
, @brwsr_Type VARCHAR(128)
, @brwsr_Browser VARCHAR(128)
, @brwsr_Version VARCHAR(16)
, @brwsr_MajorVersion VARCHAR(16)
, @brwsr_MinorVersion VARCHAR(16)
, @brwsr_Platform VARCHAR(128)
, @brwsr_Beta VARCHAR(16)
, @brwsr_Crawler VARCHAR(16)
, @brwsr_AOL VARCHAR(16)
, @brwsr_Win16 VARCHAR(16)
, @brwsr_Win32 VARCHAR(16)
, @brwsr_Frames VARCHAR(16)
, @brwsr_Tables VARCHAR(16)
, @brwsr_Cookies VARCHAR(16)
, @brwsr_VBScript VARCHAR(16)
, @brwsr_EcmaScriptVersion VARCHAR(16)
, @brwsr_JavaApplets VARCHAR(16)
, @brwsr_ActiveXControls VARCHAR(16)
, @brwsr_JavaScriptVersion VARCHAR(16)
)
AS
BEGIN
/*************************************************************************
Joe Kelly
2013-11-08 15:50:13.990
For collecting data about the browser a user is employing, called from
the default page in the portal
*************************************************************************/
SET NOCOUNT ON
DECLARE @errorMsg VARCHAR (MAX) = ''
BEGIN TRY
INSERT Foo.userBarValues (
sessionId
, ss_Username_aspx
, ss_Email_aspx
, ss_IsAdmin_aspx
, ss_ActualUsername_aspx
, ss_ActualIsAdmin_aspx
, ss_FullName2_aspx
, ss_HRAdmin
, ss_eRF_Agency
, ss_BudEntryAlways
, sv_APPL_MD_PATH
, sv_APPL_PHYSICAL_PATH
, sv_AUTH_TYPE
, sv_AUTH_USER
, sv_INSTANCE_META_PATH
, sv_LOCAL_ADDR
, sv_LOGON_USER
, sv_REMOTE_ADDR
, sv_REMOTE_HOST
, sv_REMOTE_USER
, sv_REQUEST_METHOD
, sv_SCRIPT_NAME
, sv_SERVER_NAME
, sv_SERVER_PORT
, sv_SERVER_PROTOCOL
, sv_SERVER_SOFTWARE
, sv_URL
, sv_HTTP_CONNECTION
, sv_HTTP_ACCEPT
, sv_HTTP_ACCEPT_ENCODING
, sv_HTTP_ACCEPT_LANGUAGE
, sv_HTTP_COOKIE
, sv_HTTP_HOST
, sv_HTTP_USER_AGENT
, brwsr_computer_name
, brwsr_MachineName
, brwsr_Type
, brwsr_Browser
, brwsr_Version
, brwsr_MajorVersion
, brwsr_MinorVersion
, brwsr_Platform
, brwsr_Beta
, brwsr_Crawler
, brwsr_AOL
, brwsr_Win16
, brwsr_Win32
, brwsr_Frames
, brwsr_Tables
, brwsr_Cookies
, brwsr_VBScript
, brwsr_EcmaScriptVersion
, brwsr_JavaApplets
, brwsr_ActiveXControls
, brwsr_JavaScriptVersion
)
SELECT
@sessionId
, @ss_Username_aspx
, @ss_Email_aspx
, @ss_IsAdmin_aspx
, @ss_ActualUsername_aspx
, @ss_ActualIsAdmin_aspx
, @ss_FullName2_aspx
, @ss_HRAdmin
, @ss_eRF_Agency
, @ss_BudEntryAlways
, @sv_APPL_MD_PATH
, @sv_APPL_PHYSICAL_PATH
, @sv_AUTH_TYPE
, @sv_AUTH_USER
, @sv_INSTANCE_META_PATH
, @sv_LOCAL_ADDR
, @sv_LOGON_USER
, @sv_REMOTE_ADDR
, @sv_REMOTE_HOST
, @sv_REMOTE_USER
, @sv_REQUEST_METHOD
, @sv_SCRIPT_NAME
, @sv_SERVER_NAME
, @sv_SERVER_PORT
, @sv_SERVER_PROTOCOL
, @sv_SERVER_SOFTWARE
, @sv_URL
, @sv_HTTP_CONNECTION
, @sv_HTTP_ACCEPT
, @sv_HTTP_ACCEPT_ENCODING
, @sv_HTTP_ACCEPT_LANGUAGE
, @sv_HTTP_COOKIE
, @sv_HTTP_HOST
, @sv_HTTP_USER_AGENT
, @brwsr_computer_name
, @brwsr_MachineName
, @brwsr_Type
, @brwsr_Browser
, @brwsr_Version
, @brwsr_MajorVersion
, @brwsr_MinorVersion
, @brwsr_Platform
, @brwsr_Beta
, @brwsr_Crawler
, @brwsr_AOL
, @brwsr_Win16
, @brwsr_Win32
, @brwsr_Frames
, @brwsr_Tables
, @brwsr_Cookies
, @brwsr_VBScript
, @brwsr_EcmaScriptVersion
, @brwsr_JavaApplets
, @brwsr_ActiveXControls
, @brwsr_JavaScriptVersion
END TRY
BEGIN CATCH
--
SELECT @errorMsg = foo.fnGetErrorTryCatch(0)
SELECT @sessionId = 'Error logging values for session: ' + @sessionId
EXEC dbo.ins_sys_error_log
'foo.insBarBrowserValues'
, @sessionId
, 0
, @errorMsg
, 1
END CATCH
END
Friday, November 8, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment