'how do I fix HTTP Error 401.3 - Unauthorized?

So I've come across a problem, what I am trying to do is "Check if the python file is ready to execute" as verbatim by my CS professor. So here I what I have done so far:

-Enabled Directory Browsing

-Added a new Script Map

-Linked the executable to the python executable of my python project

-Changed its directory to a new folder (as instructed)

-Created a New Python File with this code in it: print("Content-Tytpe: text/html\n"); number1 = 1

while number < 10:
    print("Hello Python World! <br>");
    number = number+1

-and finally clicked on "Browse .80"

I clicked on "test.py" (the python file) and this showed up: enter image description here

I researched a couple of fixes in this site and among others and this is what I have tried: -Checked the permissions in the folder and made added a new permission for Everyone with Full Control Access

-Checked Authentication and Anonymous Authentication and set it to Application Pool Identity, both on the Desktop and the Default Website

-I even went to go as far as resetting my PC to check if some other third party application is affecting it

I am really at the end of my rope here so any help would be greatly appreciated.

iis


Solution 1:[1]

Try to refer to the steps below.

  1. In IIS, select your site -> Double click on Authentication -> Select Anonymous authentication-> Right-click on it and select Edit option.

  2. Select a Specific user option. Set IUSR, click OK.

enter image description here

  1. Go to the site folder-> open its properties-> go to Security tab-> Make sure IIS_USRS has Read & execute, List folder contents, Read permissions.

enter image description here

After that try to visit the page again.

If the issue persists, try to check whether you are able to visit any HTML file in that folder or not.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Deepak-MSFT