Do not use DllImport in a .Net application unless necessary. In this case, impersonation is native to .Net so use .Net libraries.
However, if you want the code to run as a user without asking for their password then you have to turn on Windows Authentication in IIS so that windows will authenticate them and then also turn impersonation on in web.config. See
https://msdn.microsoft.com/en-us/library/aa292118(v=vs.71).aspx[
^]