after some searching, got the way to do this and is working well
had set the authentication to windows in the webconfig and set up IIS to use basic windows authentication.
and it pulls out the username with the
User.Identity.Name
and adding
System.Web and
System.Web.Security
tried using this after hosting it on the server and works well.