I am using the below code for authentication of the user with the remote server.If I am giving correct username and password, there is no issue because authentication is hap
You need to check the error count and cancel the authentication challenge appropriately:
if ([challenge previousFailureCount]) { [[challenge sender] cancelAuthenticationChallenge:challenge]; } else { [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; }