Programing

HTTP 오류 403.14-금지-웹 서버가이 디렉토리의 내용을 나열하지 않도록 구성되었습니다.

lottogame 2020. 7. 3. 18:40
반응형

HTTP 오류 403.14-금지-웹 서버가이 디렉토리의 내용을 나열하지 않도록 구성되었습니다.


방금 Visual Studio 2012에서 빈 웹 사이트를 새로 만들고 실행을 클릭했습니다 (예 : 브라우저에서보기).이 오류가 발생합니다.

HTTP 오류 403.14-금지 웹 서버가이 디렉토리의 내용을 나열하지 않도록 구성되었습니다.

IIS로 이동하여 디렉토리 찾아보기를 클릭 한 후 디렉토리 찾아보기가 사용 가능한지 확인했지만 여전히이 오류가 발생합니다. 알아낼 수 없습니까?

방금 만든 웹 사이트 프로젝트가 이상하다고 생각한 IIS 관리자의 기본 웹 사이트에 표시되지 않습니다.

이 오류를 어떻게 제거합니까?


이것을 웹 구성 파일에 유지 한 다음 add value = "yourwebformname.aspx"의 이름을 바꾸십시오.

<system.webServer>
    <defaultDocument>
       <files>
          <add value="insertion.aspx" />
       </files>
    </defaultDocument>
    <directoryBrowse enabled="false" />
</system.webServer>

그밖에

<system.webServer>
    <directoryBrowse enabled="true" />
</system.webServer>

이 문제는 웹 사이트에 Directory Browsing기능이 설정되어 있지 않고 기본 문서가 구성되어 있지 않기 때문에 발생 합니다. 이 문제를 해결하려면 다음 방법 중 하나를 사용하십시오. 이 문제를 해결하기 위해 MS 지원 페이지에 언급 된 방법 1의 단계 와 권장 방법을 따랐습니다 .

방법 1 : IIS에서 디렉터리 찾아보기 기능을 사용하도록 설정 (권장)

  1. IIS 관리자를 시작하십시오. 이렇게하려면 시작, 실행을 차례로 누르고 inetmgr.exe를 입력 한 다음 확인을 누릅니다.

  2. IIS 관리자에서 서버 이름, 웹 사이트를 차례로 확장 한 다음 수정하려는 웹 사이트를 클릭합니다.

  3. 기능보기에서 디렉토리 찾아보기를 두 번 클릭하십시오.

  4. 작업 창에서 사용을 클릭합니다.

그래도 문제가 해결되지 않으면 디렉토리 목록 문제와 다른 문제 일 수 있습니다. 아래 단계를 따르십시오.

방법 2 : 기본 문서 추가

이 문제를 해결하려면 다음 단계를 수행하십시오.

  • IIS 관리자를 시작하십시오. 이렇게하려면 시작, 실행을 차례로 누르고 inetmgr.exe를 입력 한 다음 확인을 누릅니다.
  • IIS 관리자에서 서버 이름, 웹 사이트를 차례로 확장 한 다음 수정하려는 웹 사이트를 클릭합니다.
  • 기능보기에서 기본 문서를 두 번 클릭하십시오.
  • 작업 창에서 사용을 클릭합니다.
  • 파일 이름 상자에 기본 문서의 이름을 입력 한 다음 확인을 클릭합니다.

방법 3 : IIS Express에서 디렉터리 찾아보기 기능 활성화

참고이 방법은 IIS Express를 사용할 때 문제가 발생하는 웹 개발자를위한 것입니다.

다음과 같이하세요:

  • 명령 프롬프트를 연 다음 컴퓨터의 IIS Express 폴더로 이동하십시오. 예를 들어 명령 프롬프트에서 다음 폴더로 이동하십시오.C:\Program Files\IIS Express

  • 다음 명령을 입력 한 후 Enter를 누르십시오.

    appcmd set config /section:system.webServer/directoryBrowse /enabled:true


cmd로 이동하여 다음을 입력하십시오.

x64 OS : % windir % \ Microsoft.NET \ Framework64 \ v4.0.30319 \ aspnet_regiis.exe -ir

x32 OS : % windir % \ Microsoft.NET \ Framework \ v4.0.30319 \ aspnet_regiis.exe -ir

이것은 올바른 버전을 설치하고 IIS는 MVC 디렉토리 탐색을 이해합니다


이 문제에는 여러 가지 이유가있을 수 있습니다. IIS 8.5에서 나를 위해 일한 것은 다음과 같습니다.

단계

  1. 검색 창에 "창 기능 켜기 / 끄기"를 입력하십시오.
  2. 서버 관리자에서 "역할 및 기능 추가"를 클릭하십시오.
  3. 마법사에서 웹 서버로 아래로 스크롤하여 : 웹 서버-> 응용 프로그램 개발을 선택하십시오. 스크린 샷과 같이 목록에서 CGI를 제외한 모든 항목을 선택하십시오.

여기에 이미지 설명을 입력하십시오

  1. 마지막으로 다음을 누르고 설치하십시오.
  2. IIS를 다시 시작하십시오.

귀하의 웹 사이트가 작동하기 시작할 수 있습니다.


web.config파일에 다음 설정을 추가 하십시오.

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

시작 페이지를 설정하십시오.

이 문제가 발생했을 때 솔루션 탐색기로 이동하여 처음보고 싶은 페이지 (내 경우에는 "Home.aspx)를 찾은 다음 마우스 오른쪽 단추를 클릭하고"시작 페이지로 설정 "을 선택했습니다. Visual Studio 2012 Professional에서 사용되었으며 Firefox에서 실행했습니다.


방금 web.config 파일 에이 코드 스 니펫을 붙여 넣고 오류가 해결되었습니다.

<system.webServer>
    <directoryBrowse enabled="true" />
</system.webServer>

제어판> Windows 기능 켜거나 끄기

인터넷 정보 서비스> 월드 와이드 웹 서비스> 응용 프로그램 개발 기능

두 가지 옵션을 활성화

.NET 확장 성 3.5
.ASP.NET 3.5

아래의 여기에 이미지 설명을 입력하십시오


빈 웹 사이트 템플릿은 Web.config 파일을 포함하지만 다른 파일은 포함하지 않는 ASP.NET 웹 사이트를 만듭니다. 찾아보기 또는 실행할 때 표시 할 기본 페이지가 없음을 의미합니다.

이 오류 메시지는 IIS에서 기본 문서를 올바르게 설정 및 구성하지 않았 음을 의미합니다.

이것이 구성되면 오류 메시지가 사라집니다.


IIS의 사이트에서 :

  1. '고급 설정'을 선택하십시오
  2. 그런 다음 응용 프로그램 풀에 대해 "ASP.NET v4.0"을 선택하십시오.

예를 들어 이미지


나는 이것에 대한 하나의 빠른 치료법을 가지고 있습니다. 실제로 웹 페이지를 시작 페이지로 설정하지 않았기 때문에이 오류가 발생했습니다. 아래와 같이 설정된 시작 페이지로 웹 페이지 (html / aspx)를 수행했을 때이 오류가 수정되었습니다.여기에 이미지 설명을 입력하십시오

이 솔루션이 다른 사람들에게 도움이 될지 모르겠습니다.


문제

Visual Studio에서 WebForms ASP.Net 웹 사이트를 실행할 때 오류 : 403.13

해결책

루트에 대한 액세스가 거부되었습니다 : http : // localhost : 51365

로그인 페이지 또는 존재하는 모든 페이지로 이동하면 작동합니다.

http : // localhost : 51365 / Login.aspx


In my case, I experienced this error because my webapp was .NET v4, and the application pool was configured for .NET v2.

Double-clicking on the application pool brings up a popup window, where we can select the desired version of .NET Framework.


For my case, I received the same error after creating an empty Web Api project.

I solved it by editing RouteConfig.cs in the App_Start folder :)

I replaced the line of code reading :-

defaults: new { action = "Index", id = UrlParameter.Optional }

with the following :-

defaults: new { controller = "Index", action = "Index", id = UrlParameter.Optional }

Notice I just had to specify the Controller whose index action I would like to invoke first.

Well all the above responses didn't solve my case (as I wanted) e.g.

  • Enabling directory browsing from web.config just listed all files and folders in my project just like php would do when you don't have an index file
  • Setting defaultDocument also didn't work for me somehow still got the HTTP Error 403.14 (Still have no idea why)

If there may be anyone in similar circumstances as mine then give this a try.


I was getting this error and change the Application Pool Managed Pipeline Mode to "Integrated" solves the problem.

Source: Running a .NET 4.6 MVC application on IIS 8.5 (Windows Server 2012)


This can be caused by a bum applicationhost.config entry.

Stop IIS Express if it's running (right-click the light-blue scroll-thingy icon in the Windows System Tray; Exit).

Go to your project's Properties > Web, and check that the Project Url is correct. In case of an https url, make sure it includes a port number in the valid range. A correct URL could be: https://localhost:44300/. Now press the "Create Virtual Directory"-button next to the URL. This adds a new entry to applicationhost.config.

Start the project again and hopefully you will no longer get the error.


I'm sure after years you probably have an answer already. But in case someone else is looking for an answer in the future.

For my problem, I didn't have to at anything to the web.config. I didn't think I would need to either as it was working previously.

Make sure no folder is named the same as your page, I had a folder called "blog" and a page named "blog.aspx", it was trying to load the folder, I noticed this in the link, changed the folder to blogContent, now it loads fine.

I'm posting a copy here as you're the first in the search query.


SOLVED
Search "Windows Feature" on start ->
Click "turn features on and off" ->
Expand "Internet Information Services" and
Check every progrm in every subfolder and
Click "OK"
This will fix all your problems. 여기에 이미지 설명을 입력하십시오


In my case I was missing the Microsoft.Owin.Host.SystemWeb nuget.


right click on your project in solution explorer and then click add new item, add a HTML page and name it as index.HTML after all rerun your application


This could happen for any number of reasons. If you have tried through all of the above and still getting the same error, I have one more solution.

Another reason this could happen is that

  1. If you have the same code base running before you started to run the fresh solution, you might encounter this error. The reason is that IIS Express is trying to run on the same port as it was for the old solution which has the physical path registered for the application start URL.
  2. Since the IIS cannot figure out the physical path to run the solution, it might not be able to locate all the dlls required to start the application.

Solutions:

  1. Try to change the application port to default. For example., Use http://localhost/ instead of http://localhost:25836/

  2. 이전 응용 프로그램에 기본 포트를 이미 사용한 경우 다른 포트로 변경하십시오. 예 : http://localhost:25364/대신http://localhost/

이렇게하면 IIS / IIS Express가 실행하려는 최신 응용 프로그램의 기본 bin 경로를 가리켜 응용 프로그램을 시작하는 데 필요한 모든 dll이있게됩니다.

참고 URL : https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con

반응형