Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon function to APS stops responding

Status
Not open for further replies.

wilsonmichael

Programmer
May 29, 2002
21
US
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(&quot;sToken&quot;) = sToken
func_crystalAccess = true
end if

end function
 
Never got an answer from this forum or from crystal. In further investigating i discovered thread locking was taking place on the logontokenmgr object causing the webserver to stop responding to crystal requests.To get around this i decided to stop using the LogonTokenMgr. After doing this the problem went away.

I have also since upgraded to Crystal 9 but i did not try to implement the logontokenmgr out of fear the problem would still occur.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top