Removes authentication modules with the specified authentication scheme from the list of registered modules.
Type Reason ArgumentNullException authenticationScheme is null. InvalidOperationException There is no registered module with the authenticationScheme authentication type.
The AuthenticationManager.Unregister(IAuthenticationModule) method removes the authentication module with the specified authentication scheme from the list of authentication modules called by the AuthenticationManager.Authenticate(string, WebRequest, ICredentials) method. The module must have been added to the list using the AuthenticationManager.Register(IAuthenticationModule) method before it can be removed from the list.