In some condition, like another user log in with the some ID, I want to
close a user's session.
How can we terminate a user's session with program?
See my earlier reply about session timeout - basically, you can't...
Remember that IIS sessions are by definition independent of each other so,
unless you record each successful login in something like SQL Server, one
session can't have any knowledge about any other session.
However, if you do log each successful login, you could very simply add code
to the OnInit of each ASPX's code-behind which did something like:
if(<some condition fetched from SQL Server>)
{
Session.Abandon();
}