Make sure the FileName1 variable is not null before trying to access it via the Session[FileName1] syntax...
Here's a link to someone else that was having the same problem: http://forums.asp.net/t/1069600.aspx
Here's his answer:
In the code, I found the following line:
//some code
Session.Add(sessionVarName, sessionVarValue);
//some other code
Apparently, because of some dirty data, there is a time when sessionVarName is null.
Session.Add will not throw any exception in this case, and if your Session Mode is "InProc", there will be no problem. However, if your Session Mode is "SQLServer", during deserialization of the session store, you will got the exception that I got. So, to filter out dirty data, I modified the code to become:
if (sessionVarName != null)
{
//somecode
Session.Add(sessionVarName, sessionVarValue);
//some other code
}