HTTP Error 401.2 (occurred on Windows Server 2012)

<< Click to Display Table of Contents >>

Navigation:  Troubleshooting >

HTTP Error 401.2 (occurred on Windows Server 2012)

Error in browser:

HTTP Error 401.2 - Unauthorized

Possible reason 1:

The Windows 'Forms Authentication' is not enabled in the Windows Features.

Solution:

Activate the 'Forms Authentication' in the 'Windows Features'.

Steps to execute (via the command line):

1.Open the Windows comman line.

2.Type: C:\Windows\System32>DISM.EXE /enable-feature /online /featureName:IIS-FormsAuthentication.

 

Steps to execute (via the Server Manager):

1.Open the Server Manager.

2.On the dashboard select the entry 'Add Roles And Features':
OnDashboardClickAddRolesAndFeatures
 

3.Click on 'Server Selection':
ClickOnServerSelection
 

4.Click on 'Server Roles':
ClickServerRoles
 

5.Navigate to 'Web Server (IIS)' > 'Web Server' > 'Security' and enable the 'Windows Authentication':
OpenWebServerOpenSecurityActivateWindowsAuthentication

 

6.Click on 'Next' until the button 'Install' appears. Enable the checkbox 'Restart the destination server automatically if required' and press 'Install':
ClickNextActivateRestartClickNestUntilInstallAppears

7.After the installation press the button 'Close' and try to execute the SpaceObServer Web Access in your browser again.

Possible reason 2:

The 'Windows Forms Authentication' is not enabled for the web site.

Solution:

Enable the 'Forms Authentication' via the IIS-Manager.

Steps to execute (via the IIS-Manager):

1.Open the IIS-Manager.

2. In the left pane, open 'Sites' and select the 'SpaceObServer Web Access'.

3. In the middle pane in the section 'IIS' doubleclick 'Authentication'.

4. Select 'Forms Authentication'. In the right pane press 'Enable':
EnableFormsAuthentication

5. Refresh your browser.