Thursday, May 17, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: JBauza
New Today New Today: 19
New Yesterday New Yesterday: 33
User Count Overall: 22559

People Online People Online:
Visitors Visitors: 7
Members Members: 0
Total Total: 7

Online Now Online Now:

ClearCanvas Community Forums

ImageServer 1.5 web management - session times out
Last Post 2009-10-05 09:41 AM by steve. 15 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
garydickson
Basic Member
Basic Member
Posts:12

--
2009-09-02 08:48 AM  

Hi,

Just wondered if anyone else is having a problem with the ImageServer 1.5 web pages timing out almost as soon as you've logged in? 

It is related to the date - I didn't get this problem last week and setting the server clock back sorts it out.  Presumably a UK/US date format thing? (I'm in UK)

I've not been able to run it properly through a debugger., but as a quick workaround I've edited the function GetSecondsLeft() in the SessionTimeout.ascx control to always return a positive number.

Gary

 

 



steve
Senior Member
Senior Member
Posts:1932

--
2009-09-02 10:28 AM  
Gary,

Could you clarify a bit further on the setting the clock solution? I'm curious, was it a time inconsistency between client & server that caused the issue and synchronizing solved it? Or did you just set the time back a few days? Or was it perhaps something with the date format, ie , 1/9/2009 was interpreted as Jan 9, instead of Sept. 1?

Steve


Real-time support available to Clinical Edition and Team Edition customers
thanhhuynh
Veteran Member
Veteran Member
Posts:150

--
2009-09-02 10:31 AM  

Hi Gary,

The fact that it was working last week for you and not this week suggested it was the problem with the date format.  Can you check what region setting is configured for IIS (you can find it in the About page at the end of the license text) ?

We have also seen the same behaviour when the url contains an underscore (e.g., http://my_machine/ImageServer ). This is a known bug in IE and the workaround is to change the hostname or use the ip address in the url.

Hope this helps.

Thanh



Real-time support available to Clinical Edition and Team Edition customers
garydickson
Basic Member
Basic Member
Posts:12

--
2009-09-02 11:04 AM  


Hi,

Thanks for the responses. Server regional settings are "en-GB, en-US" according to the About page. Regional and Language Options on Control Panel have everything set to English (UK).

No underscore in server name (timeout happens in both IE7 and FF3.5.2).

Regarding setting the clock, I put it back to 13th August - an unambiguous date as 13/08/2009 wouldn't be valid as a US date and it was fine; 02/09/2009 gives me the immediate timeout. So yes, I believe it's a date format problem. I'm not even using a client at this point and the time on the database server is the same, give or take a minute.

Edit: I should maybe add that I am running IIS7 on Server 2008.


Thanks,

Gary



Fattony
Advanced Member
Advanced Member
Posts:43

--
2009-09-02 06:07 PM  

 

Hi All,

I'm currently experiencing exactly the same timeout problem this is the second server I've experienced this on thinking it was an OS issue \i created a fresh install w2k3, .net3.5 sqlexpress+sp2 etc all regional options UK .I've attached screenshot showing timeout I've also cleared down cookies in browser still logs me out after 5 secs with the same message as seen in attachment ..open to suggestions



thanhhuynh
Veteran Member
Veteran Member
Posts:150

--
2009-09-03 10:33 AM  

Although this is not ideal, you can try to force IIS to use US regional settings by adding this line in the web config inside <system.web>

 
<globalization culture="en-US" uiCulture="en-US"/>



Real-time support available to Clinical Edition and Team Edition customers
jbluks
Advanced Member
Advanced Member
Posts:30

--
2009-09-03 10:59 AM  

Hi,

I've figured out the problem, and there was a bug in the code that didn't handle the localization of the date and switched the day/month putting the date in the past and causing the session to be expired. Fortunately, the fix is straightforward and done in Javascript, so no compiling is required.

I have attached the instructions and code in a text file, since posting code to the forum was a bit finicky.

This should solve the problem, Let me know if it doesn't.

Edit: Note that this fix works for "en-GB" format only. If you're using another localization the GetDateFromUTCString() function needs to be changed to match your localization. A full fix to this will be implmented in a future release that will work independent of localization.

Jonathan


Attachment: LoginTimoutFix.txt

garydickson
Basic Member
Basic Member
Posts:12

--
2009-09-03 12:38 PM  

Thanks Jonathan,

Works for me now.  Oddly though, the Session Expiry Time shown on the status bar (bottom of IE6  anyway, nothing on FF) is about 45 mins in the past.  But it works so I'm happy.

Gary



jbluks
Advanced Member
Advanced Member
Posts:30

--
2009-09-03 03:25 PM  

 Glad to hear that it's working, and thanks along with everyone else, for bringing the bug to our attention.

Cheers,

Jonathan

 



FatPaulie
Basic Member
Basic Member
Posts:20

--
2009-09-03 07:00 PM  
ALso workin for me ..many thanks Jonathan ;)


d_funes
Advanced Member
Advanced Member
Posts:45

--
2009-09-07 02:55 PM  

It doesn´t work for me, I change the local settings to En(UK), and then I wrote the code as you describe in your attachment, but I´m a physician so I don´t understand about write codes, if I attache the file could you get a look on it and tell me if there is anything wrong. I´ve change the name of the file for obvious reassons


Attachment: SessionTimeout1.txt

garydickson
Basic Member
Basic Member
Posts:12

--
2009-09-08 06:18 AM  

 

I don't know enough about JavaScript to be sure, but maybe having your function  GetDateFromUTCString() before the variable declarations (var countdownTimer etc) is the problem? 

I have attached my version of the file, with the fix working. 

Gary


Attachment: SessionTimeout_ascx.txt

d_funes
Advanced Member
Advanced Member
Posts:45

--
2009-09-08 09:34 AM  
so just copying and paste should be the solution?

Thanks for your help


jbluks
Advanced Member
Advanced Member
Posts:30

--
2009-09-08 04:15 PM  

 Hi d_funes,

You're close, but there are a couple more changes required. The function GetDateFromUTCString should be okay where it is, but you also need to do the following:

In the function GetExpiryTime(), the line that says:

 

return c.substring(name.length,c.length);

 

Should be:

 

return GetDateFromUTCString(c.substring(name.length, c.length));

Then, in the function GetSecondsLeft(), where it says "sessionExpiry.getTime()" and "sessionExpiry.toLocaleString()" it should say "expiryTime.getTime()" and "expiryTime.toLocaleString()" 
I think that should be it. Hope this helps, 
Jonathan

 

 



javiert77
New Member
New Member
Posts:6

--
2009-10-03 07:18 PM  
hi.

This error happens to me, I think you have to define which is the correct locale for each country in particular. I disable the expression if (timeleft <= 0) by passing the variable hideWarning = true;
to observe how the system behaved, the error never comes out, but it is not correct, because the system is working internally with a regional configuration that I do not know. The right thing is knowing that this date format using the system and so set the regional configuration.

waiting for your help.

thanks



steve
Senior Member
Senior Member
Posts:1932

--
2009-10-05 09:41 AM  

 Javier,

The patch here was something we posted to help us avoid having to do a service pack/patch to resolve this issue. We did create a ticket for this here:

https://trac.clearcanvas.ca/source/ticket/5150

And we did end up resolving it for our next release by forcing the format of the time that we're using in the cookie for tracking logouts.

Steve



Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2012 ClearCanvas Inc.