• Register
0 votes
1.4k views

Problem :

I am facing the below error:

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

My project works fine on the localhost. But when I try to run it on the IIS (7.5) I often face the above exception.

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

I have already tried running the "aspnet_regiis - i" , however it is not working in my case. I am unable to know is there something required to execute my AngularJS files on the IIS for Web.API project?

Also I have tried to set the read/write/modify access for the "IUSR" & "IIS_ISURS" users of my whole project. But still I am facing the same exception on my IIS.

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

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

By default the IUSR account is used for the anonymous user.

All you need to do is follow below procedure :

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

Now your Problem is resolved.

9 7 4
38,600 points

Related questions

0 votes
0 answers 24 views
0 votes
1 answer 3.2K views
3.2K views
Problem : I want to send a call using ajax but in Chrome getting following error Failed to load resource: the server responded with a status of 500 (internal server error) But for firefox getting no error. I also tried to record the ajax call in firebug but there is no call request in ... function (msg) { }, error: function (xhr, status, error) { alert(error.responseTextss); } }); }); }); }); }
asked Nov 22, 2019 peterlaw 6.9k points
0 votes
1 answer 391 views
391 views
Problem : I am unable to solve my link problem. Can anybody help on to this to link the CSS and JS File? I am facing below error : Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/ ... .js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js
asked Jan 10, 2020 alecxe 7.5k points
1 vote
1 answer 367 views
367 views
Problem : We are now running the 32-bit Windows server 2008 with the IIS version of 7. We are trying to publish the asp.net 4.0 webapp but so far our attempts have failed and only yielded the few warnings in our serverlog without even the stopping our 4.0 application ... very badly after that we ran out of the ideas on what to do on our issue so any form of the input would be greatly appreciated.
asked Dec 30, 2019 alecxe 7.5k points
2 votes
1 answer 49 views
49 views
Problem : I am learning to host my site on IIS. I am facing below error while trying to host my Asp.net site with the IIS. IIS cannot read configuration file due to insufficient permissions . Please find below the current contents of my web.config file: <?xml version ... research on above error but I am still unable to fix the hosting error. I am looking for the help in fixing the hosting error.
asked May 7, 2020 stewart 4k points
0 votes
1 answer 18 views
18 views
Problem: I am trying to enable CORS on one of the very specific actions in my Asp.net Web Api. Please find below my code and tell me if I am missing anything: [Route("api/mycontroller/myaction")] [HttpPost] [EnableCors("https://example.com", "*", "post")] public ... http method 'OPTIONS'." I also tried to remove the [HttpPost] annotation but to no avail. Have I made any mistake in my above code?
asked Aug 19, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 93 views
93 views
Problem : I want to deploy my ASP.NET application. I have tried deploying my site to IIS, but when I visit it with the browser, it gives me following error : Server Error 500 - Internal server error. There is a problem with the resource you are looking for ... error: The page cannot be displayed because an internal server error has occurred. I want to see the actual issue behind my server error?
asked Dec 7, 2019 alecxe 7.5k points
0 votes
1 answer 49 views
49 views
Problem : I came across a problem as follows if you set the autopostback property of a control to true, the page is posted back to the server Any solution on this ?
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 50 views
50 views
Problem : I am facing below error if I try to export datagrid to the excel. &ldquo;Control 'gridview1' of type 'gridview' must be placed inside a form tag with runat=server.&rdquo; Please find below my code : <form runat="server" id="form1"> <div runat="server" id=" ... TextBox> </form> My GridView is within the from tag with the runat="server", but still I am facing above error. How to fix this?
asked Feb 17, 2020 mphil 2.3k points
0 votes
1 answer 14 views
14 views
Problem: I am naive to Asp.Net.I am having a weird looking problem where I am trying to open up my ASP.NET MVC application but I am receiving the below ASP.NET error page which says: Server Error in '/' Application. The resource cannot be found. Description: ... unknown reason to me it seems like it is actually searching for the .aspx file. Please guide me if you think I am missing something.
asked Aug 19, 2020 Raphael Pacheco 4.9k points