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

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

The project works fine on localhost. But when I run it on IIS (7.5) I get the above exception.

My project is .net 4.5 project (Web.API 2.2), I am using AngularJS for UI in this project.

I have tried running “aspnet_regiis – i” as somewhere this was accepted as solution. But it didn’t work in my case. I don’t know is there any thing required to execute [AngularJS].js files on IIS for Web.API project?

EDIT:

I have made following changes to web.config file:

<location path="AngularJS">
<system.web>
  <authorization>
    <allow users="*" />
  </authorization>
</system.web>
</location>  
<system.web>
  <authorization>
    <allow users="*" />
  </authorization>
  <compilation debug="true" targetFramework="4.5" />
 <httpRuntime targetFramework="4.5" />
</system.web>

Also I have set the read/write/modify access for “IUSR” & “IIS_ISURS” users of whole project.

But still I get the same exception on IIS. But same running fine with VS2013.

Error:

Leave a Comment

tech