views:

124

answers:

1

I've installed ODP.NET and am using the session state service through Oracle for an ASP.NET website. I tested it, I thought, pretty thoroughly and didn't see any major problems. Some of the users have been complaining of exception errors however when they use the system. I added some extra logging and found out how to reproduce the issue. It happens when a user double clicks on a hyperlink. I have never thought about double clicking a hyperlink before in my life and never knew that users like doing that, so I hadn't tested that possibility. This sends 2 identical requests to save a session item, with the same primary key. I'm using ODP.NET 11.1.0 for the .NET 2.0 framework, and the functions being called have been obfuscated by Oracle, so I can't fix it there. Has anyone else had this problem? Does anyone know of a solution, other than to tell the users that you don't double click hyperlinks.

A: 

Firstly, This sounds like something Oracle should address. Their code should be checking for this and preventing it.

You may have to put a check into your hyperlink handlers to prevent the double-submission. You could use a utility class as a wrapper around the Oracle session provider with some lock statements to prevent double submission. I'd be careful, however- you could introduce performance problems.

Dave Swersky