Read and share...
To avoid authentication in some cases write code between these below code..
SPSecurity.RunWithElevatedPrivileges(delegate()
{
//Code.. or Functionality
}
);