This project is read-only.

Error when logging-off and logging-on as different user

Dec 5, 2012 at 2:31 PM

Hi,

We have encountered a scenario in Internet explorer which displays the following error:

"Line 819 of NakedObjects-Ajax.js

Microsoft JScript runtime error: Invalid procedure call or argument"

It is possible to dismiss the error dialogue and continue without any problems.

Steps to reproduce:

  1. Open Internet Explorer and login as a User
  2. Do something which creates a breadcrumb link in the History
  3. Logout
  4. Login as a different user
  5. The error described above should appear.
  6. The history will still contain the breadcrumb from your previous session.

Having debugged it, I can see that the NakedObjects-Ajax.js calls nakedObjects.getLinkFromHistory() and attempts to redirect to the address of that link.

I would expect that the behaviour would be that the history is cleared when I logout, so if I login as a different user the history will be empty?

Thanks very much,

John

Dec 5, 2012 at 2:43 PM

Please confirm you are using Naked Objects 5.0.  I thought we fixed this before (see http://nakedobjects.codeplex.com/workitem/36 )  - so if you are using 5.0 it means that this fix has somehow been lost in the transition to MVC 4.  

Dec 5, 2012 at 2:47 PM

Hi Richard,

Yes running N.O version 5.0 (NakedObjects.IDE is on version 4.2) and MVC 4.

Thanks

John

Dec 5, 2012 at 3:34 PM

Thanks, John.  I've re-opened that issue (#36) for further investigation

Dec 5, 2012 at 4:07 PM

I've tried but failed to reproduce this.

Could you check your AccountController - in 'LogOff' there should be

    Session.Abandon(); // clear session so that breadcrumb history does not survive between logins in same browser


Dec 5, 2012 at 4:18 PM
Hi,
We’re using WIF so I checked the WifAccountController and there’s no AbandonSession in the logoff action.
Should I just add it there?
John
From: scascarini
Sent: ‎05‎ ‎December‎ ‎2012 ‎16‎:‎07
To: John Mc Avinue
Subject: Re: Error when logging-off and logging-on as different user [nakedobjects:405659]

From: scascarini

I've tried but failed to reproduce this.

Could you check your AccountController - in 'LogOff' there should be

    Session.Abandon(); // clear session so that breadcrumb history does not survive between logins in same browser


Dec 5, 2012 at 4:22 PM

Probably  -  try it out.

 (Note:  As I've said before, we have very little experience of using WIF ourselves and don't actively test it, so you should effectively treat all the WIF code as if it was your own.)

Dec 5, 2012 at 4:30 PM
Understood. I added that just before FormsAuthentication.Signout() and it has resolved the problem.
Thanks to both of you for your help.
John
From: richardpawson
Sent: ‎05‎ ‎December‎ ‎2012 ‎16‎:‎22
To: John Mc Avinue
Subject: Re: Error when logging-off and logging-on as different user [nakedobjects:405659]

From: richardpawson

Probably - try it out.

(Note: As I've said before, we have very little experience of using WIF ourselves and don't actively test it, so you should effectively treat all the WIF code as if it was your own.)