Unable to retrieve the user sid from context



Hi,

I have a code snippet C# when executed gives the following exception
on IE.

___________________________________________________________________
Unable to retrieve the user sid from context. This is typically caused
by the context not yet being set.

Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Exception: Unable to retrieve the user sid
from context. This is typically caused by the context not yet being
set.
_____________________________________________________________________

Why this exception is raised?

Thanks in adv.,
PI

.