I have a WCF service hosted on IIS, and i am writing a file on the server through wcf servcie and i just wanted to make sure what credintials is using to access the services.
how do i check to see what account is using?
The results will depend on how you've secured your WCF service, anonymous, windows integrated, basic, are you using impersonation, etc.
In general though you can check the identity of the current process with the following:
EDIT: simple WCF method to return the account
public string GetUserName() {
return System.Security.Principal.WindowsIdentity.GetCurrent().Name;
}