Failed to load resource: the server responded with a status of 401 (Unauthorized) /App/AngularJS/angular.min.js

后端 未结 5 741
无人及你
无人及你 2021-02-04 03:37

I am having the following error:

Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost/App/AngularJS/angular.min.js
         


        
相关标签:
5条回答
  • 2021-02-04 04:13

    When servers respond with access denied message (401 Unauthorized access), it means that the anonymous IIS user account is unable to access the resources because of permission issues.

    By default, IUSR account is used for anonymous user.

    All you need to do is:

    IIS ->
    Authentication --> Set Anonymous Authentication to Application Pool Identity.

    Problem solved :)

    0 讨论(0)
  • 2021-02-04 04:16

    Assuming that you are using form authentication and you are trying to get it before login. You can use the following in your web.config file inside <configuration>.

    <location path="AngularJS">
     <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
    </location>
    

    It will make you files inside AngularJS folder available without login

    0 讨论(0)
  • 2021-02-04 04:18

    Well,

    It's strange but It worked. The solution was to set the default user for "Connect as" in IIS. See the image given below.

    enter image description here

    I specified the administrator user & this started to work in IIS. I think this is some kind of requirement with AngularJS to work on IIS.

    Thanks for replies.

    0 讨论(0)
  • 2021-02-04 04:26

    It will work when you add IUSR into the application folder security.

    0 讨论(0)
  • 2021-02-04 04:35

    Also I have set the read/write/modify access for "IUSR" & "IIS_IUSR" users of whole project. properties image

    this was enough for me to get around the same issue.

    PS. sorry for using your image, just want to emphasize the step you mentioned that worked for me.

    0 讨论(0)
提交回复
热议问题