Since I am tired to answer questions related to identites confusion in many posts
I decided to separate it in dedicated post.
User.Identity.Name represents identity passed from IIS.
WindowsIdentity.GetCurrent().Name is he identity under which the thread is running.
Now their values are:
=============================================================================
Impersonate attribute Anonymous User.Identity.Name WindowsIdentity.GetCurrent().Name
(web.config in <identity> access (in IIS) (id passed from IIS) (thread's identity)
----------------------------------------------------------------------------------------------------------------------------------------
"true" Yes Empty string IUSR_<machineName>
"false" Yes Empty string NT Authority\Network Service(*)
"true" No domain\user(**) domain\user(**)
"false" No domain\user(**) NT Authority\Network Service(*)
==============================================================================
(*) - NT Authority\Network Service (for server Windows) or ASPNET (machineName\ASPNET_WP (for Windows XP)
(**) - domain\user (for AD) or machineName\userName (for local account)