Nice programing

디렉토리에 대한“401 Unauthorized”

nicepro 2020. 10. 17. 12:21
반응형

디렉토리에 대한“401 Unauthorized”


로컬 컴퓨터에서 프로젝트를 실행하면 발생하지 않으므로 IIS 오류라고 가정합니다.

내 스타일 시트는 ~/Content/css

해당 디렉토리의 모든 파일이 페이지에로드되지 않고 직접 탐색 할 때 서버 오류가 발생합니다.

401-권한 없음 : 잘못된 자격 증명으로 인해 액세스가 거부되었습니다.

제공 한 자격 증명을 사용하여이 디렉터리 또는 페이지를 볼 수있는 권한이 없습니다.

이것은 해당 디렉토리에서만 발생하며 다른 파일에 액세스하는 데 문제가 없습니다. 이것을 막기 위해 IIS7에서해야 할 일이 있습니까?


해당 폴더에 대한 IUSR_ 컴퓨터 이름 권한 이 없을 수 있습니다 . 방금 빠른 스캔을 마쳤으며 여기에서 필요한 정보를 찾을 수있을 것 같습니다 .

그렇지 않은 경우 브라우저에서 사용자 이름과 암호를 입력하라는 메시지가 표시됩니까? 그렇다면 여기에 설명 된대로 IIS가 통합 인증 만 사용하도록 구성되었을 수 있습니다 .


  1. IIS를 열고 401을 일으키는 사이트를 선택하십시오.
  2. IIS 헤더에서 인증 속성 선택
  3. 익명 인증 선택
  4. 마우스 오른쪽 버튼으로 클릭하고 편집 을 선택한 다음 응용 프로그램 풀 ID를 선택 하십시오.
  5. 사이트를 다시 시작하면 작동합니다.

  • IIS 열기
  • 문제에 직면 한 사이트 선택

  • 아래에서 선택

여기에 이미지 설명 입력

-익명 인증을 마우스 오른쪽 버튼으로 클릭하고 편집을 클릭하고 아래를 따르십시오.

여기에 이미지 설명 입력


제공 한 자격 증명을 사용하여이 디렉터리 또는 페이지를 볼 수있는 권한이 없습니다.

This happened despite the fact the user is already authenticated via Active Directory.

There can be many causes to Access Denied error, but if you think you’ve already configured everything correctly from your web application, there might be a little detail that’s forgotten. Make sure you give the proper permission to Authenticated Users to access your web application directory.

Here are the steps I took to solve this issue.

  1. Right-click on the directory where the web application is stored and select Properties and click on Security tab.

  2. Click on Click on Edit…, then Add… button. Type in Authenticated Users in the Enter the object names to select., then Add button. Type in Authenticated Users in the Enter the object names to select.

  3. Click OK and you should see Authenticated Users as one of the user names. Give proper permissions on the Permissions for Authenticated Users box on the lower end if they’re not checked already.

  4. Click OK twice to close the dialog box. It should take effect immediately, but if you want to be sure, you can restart IIS for your web application.

Refresh your browser and it should display the web page now.

Hope this helps!


You need to check the folder permissions on your server and check that the account that you are using to run your application has access to that folder.


For me the Anonymous User access was fine at the server level, but varied at just one of my "virtual" folders.

IIS가 가상 폴더 수준에서 "인증"설정을 가지고 있다는 사실을 배우기 위해 동료의 도움을받은 다음 동료의 도움을 받아 제게 많은 도움을주었습니다. 이것이 제 곤경에있는 다른 사람에게 도움이되기를 바랍니다.


내가 찾은 또 다른 간단한 수정 사항은 IIS 관리자 내에서 로컬 IIS 사이트를 삭제 한 다음 Visual Studio의 웹 프로젝트 "속성"에서 가상 디렉터리를 다시 만드는 것입니다.

참고 URL : https://stackoverflow.com/questions/11162430/401-unauthorized-on-a-directory

반응형