wilsonmichael
Programmer
I have a 2 server CE 8.5 environemnt. Both servers have full CE 8.5 (APS,Input,Output,Job,Page,Cache,WCS,IIS) and are clustered together.
I am running my code in ASP not CSP and using IIS 5.
My code works fine for a while but every so often the web server( sometimes an hour, sometimes a day or two) stops responding to the logon function to the APS. All other pages that do not have this function work fine. In my opinion it seems i have a thread locking issue on the call. Once i restart IIS everything works fine again.
Any one have any insight.
Here is an example of my function that logs into crystal. The line of code that stops responding after a while is
this one
Set objEnt_session = objSession_mgr.Logon(sUsername,sAPS_pass,sAPS,sAuthentication)
function func_crystalAccess(sUsername,sAPS_pass,sAPS,sAuthentication)
on error resume next
Dim sToken
sToken=""
Dim objSession_mgr
Set objSession_mgr = Server.CreateObject("CrystalEnterprise.SessionMgr"
If err.number = 0 then
Dim objEnt_session
Set objEnt_session = objSession_mgr.Logon(sUsername,sAPS_pass,sAPS,sAuthentication)
if err.number = 0 then
Dim objToken_mgr
Set objToken_mgr = objEnt_session.LogonTokenMgr
if err.number = 0 then
'Use the LogonTokenManager's CreateLogonToken method to create a token.
'This method has 3 parameters
'1. ServerName - the machine name from which connection to the APS can be made.
' an empty string denotes any machine
'2. ValidDays - the number of day the token is valid
'3. ValidNums - the number of times the token can be used
sToken = objToken_mgr.CreateLogonTokenEx("",1440,1000000)
end if
end if
end if
func_clearObjects objToken_mgr,"objToken_mgr"
func_clearObjects objEnt_session,"objEnt_session"
func_clearObjects objSession_mgr,"objSession_mgr"
If Err.number <> 0 Then
func_crystalAccess = false
else
Session("sToken" = sToken
func_crystalAccess = true
end if
end function
I am running my code in ASP not CSP and using IIS 5.
My code works fine for a while but every so often the web server( sometimes an hour, sometimes a day or two) stops responding to the logon function to the APS. All other pages that do not have this function work fine. In my opinion it seems i have a thread locking issue on the call. Once i restart IIS everything works fine again.
Any one have any insight.
Here is an example of my function that logs into crystal. The line of code that stops responding after a while is
this one
Set objEnt_session = objSession_mgr.Logon(sUsername,sAPS_pass,sAPS,sAuthentication)
function func_crystalAccess(sUsername,sAPS_pass,sAPS,sAuthentication)
on error resume next
Dim sToken
sToken=""
Dim objSession_mgr
Set objSession_mgr = Server.CreateObject("CrystalEnterprise.SessionMgr"
If err.number = 0 then
Dim objEnt_session
Set objEnt_session = objSession_mgr.Logon(sUsername,sAPS_pass,sAPS,sAuthentication)
if err.number = 0 then
Dim objToken_mgr
Set objToken_mgr = objEnt_session.LogonTokenMgr
if err.number = 0 then
'Use the LogonTokenManager's CreateLogonToken method to create a token.
'This method has 3 parameters
'1. ServerName - the machine name from which connection to the APS can be made.
' an empty string denotes any machine
'2. ValidDays - the number of day the token is valid
'3. ValidNums - the number of times the token can be used
sToken = objToken_mgr.CreateLogonTokenEx("",1440,1000000)
end if
end if
end if
func_clearObjects objToken_mgr,"objToken_mgr"
func_clearObjects objEnt_session,"objEnt_session"
func_clearObjects objSession_mgr,"objSession_mgr"
If Err.number <> 0 Then
func_crystalAccess = false
else
Session("sToken" = sToken
func_crystalAccess = true
end if
end function