We really need to see more of the code to understand what is happening and the error message so we can help you out.
One of the problems may be that the session variable that you are using to store the conenction string may not exist any more as the session may have expired or something... personally I'd use and application variable rather then a session variable if I was going to do something like thist.