title: Disable registration template in ASP NET core
body: <p>How can I disable the registration form in ASP NET Core 2.2.0+?</p>
  
  <p>Just to get and remove the appropriate model, I can not, because it is not in the project, according to the documentation, I understand that this is connected with something like "ConfigureApplicationPartManager"</p>
  
  <p>Link <a href="https://github.com/aspnet/Identity/blob/master/src/UI/IdentityBuilderUIExtensions.cs" rel="noreferrer">here</a></p>
  
  <p>but I can not find an appropriate example to disable it</p>
  
  <p>the goal is to disable the registration of new users, leaving only the Login \ Password form</p>
  
  <pre><code>services.AddMvc()
              .ConfigureApplicationPartManager(x =&gt;
              {
  
  
                  var thisAssembly = typeof(IdentityBuilderUIExtensions).Assembly;
                  var relatedAssemblies = RelatedAssemblyAttribute.GetRelatedAssemblies(thisAssembly, throwOnError: true);
                  var relatedParts = relatedAssemblies.ToDictionary(
                      ra =&gt; ra,
                      CompiledRazorAssemblyApplicationPartFactory.GetDefaultApplicationParts);
              })
              .SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
  </code></pre>