programing tip

웹 서버에서 디버깅을 시작할 수 없습니다.

itbloger 2020. 8. 31. 07:33
반응형

웹 서버에서 디버깅을 시작할 수 없습니다. ASP.NET 디버깅 VS 2010, II7, Win 7 x64를 시작할 수 없습니다.


Visual Studio 2010 (관리자), Windows 7 x64에서 IIS 7을 실행하고 있습니다. 디버깅없이 IIS 7에서 ASP.NET 웹 사이트를 실행할 수 있지만 F5를 눌러 디버그하면 다음과 같은 결과가 나타납니다.

웹 서버에서 디버깅을 시작할 수 없습니다. ASP.NET 디버깅을 시작할 수 없습니다. 디버깅하지 않고 프로젝트를 시작하면 더 많은 정보를 얻을 수 있습니다.

불행히도 도움말 링크는 나를별로 돕지 않으며 커다란 사물의 나무로 이어집니다.

다음을 확인했습니다.

  • 보안 요구 사항 — 전에 특별한 작업을 수행해야했던 기억이 없습니다. IIS7의 작업자 프로세스는 w3wp.exe입니다. ASPNET 또는 NETWORK SERVICE로 실행중인 경우 디버그하려면 관리자 권한이 있어야합니다. 여기서 변경해야하는지 어떻게 알 수 있습니까?

  • 웹 사이트 속성 페이지> 시작 옵션> 디버거> ASP.NET이 선택됩니다. 사용자 지정 서버 사용은 사이트의 URL로 설정되어 있습니다 (디버깅없이 잘 작동 함).

  • 에서 디버깅이 활성화됩니다 web.config.

  • 응용 프로그램이 ASP.NET 3.5를 사용하고 있습니다 (결국 4.0으로 이동하고 싶지만 처리 할 마이그레이션이 있습니다).

  • 응용 프로그램 풀 : .NET AppPool 분류 (DefaultAppPool 시도도 함).

다음에 확인할 수있는 아이디어가 있습니까?

IIS, VS를 설치하고 웹 사이트를 만들고 테스트를 시작하는 것이 그렇게 어렵지 않을까요?

미리 감사드립니다.


IIS로 이동하여 사용중인 앱 풀이 시작되었는지 확인하십시오. 많은 경우 앱 풀을 종료하는 오류가 발생합니다. 마우스 오른쪽 버튼을 클릭하고 시작하기 만하면됩니다.


범인은 IIS Url Rewrite 모듈이었습니다. 기본 홈 URL을 가질 수 있도록 Default.aspx ( 웹 사이트시작 페이지 로 설정 됨)에 대한 호출을 사이트 의 루트로 리디렉션하는 규칙을 정의했습니다 . 그러나 분명히 VS는 이것에 문제가 있었고 혼란스러워했습니다. 이 문제는 Helicon ISAPI_Rewrite를 사용할 때 발생하지 않았으므로 확인하지도 않았습니다.

나는 완전히 새로운 웹 사이트를 처음부터 만들고 프로젝트 / 파일을 내 솔루션에 조금씩 이식하고 이것을 발견 할 때까지 web.config를 다시 빌드했습니다! 글쎄, 적어도 지금은 .NET 4.0을 사용하는 약간 더 깨끗한 사이트를 가지고 있습니다 (지금까지는 벽에 부딪히지 않을 것입니다). 그러나 얼마나 고통 스럽습니까!


Visual Studio는 시작할 때 (어떤 이유로 든) URL에 액세스를 시도합니다.

/debugattach.aspx

예를 들어 .aspx파일을 다른 곳에서 리디렉션 (또는 포착)하는 재 작성 규칙 이있는 경우이 오류가 발생합니다. 이 솔루션은 사용자의 시작 부분으로이 부분을 추가하는 것입니다 web.config<system.webServer>/<rewrite>/<rules>섹션 :

<rule name="Ignore Default.aspx" enabled="true" stopProcessing="true">
    <match url="^debugattach\.aspx" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="None" />
</rule>

이렇게하면이 특정 요청을 포착 하고 아무것도 하지 않으며 가장 중요한 것은 실행을 중지하여 다른 규칙이 실행되지 않도록합니다. 이것은 강력한 솔루션이므로 프로덕션을 위해 구성 파일에 보관하십시오.


다른 사람들을 위해 제 경우에는 네트워크 리소스 공유에 액세스하기 위해 Windows 자격 증명을 사용하도록 응용 프로그램 풀을 구성했습니다. 솔루션을 마지막으로 디버깅 한 이후로 Windows 암호를 재설정했습니다. 앱 풀 및 bada bing에 저장된 비밀번호 변경.


ApplicationPool Identity가 사용자 지정 계정으로 설정되고 컴퓨터의 암호가 변경된 경우 암호를 업데이트해야합니다.


내 시나리오의 경우 web.config의 httpErrors 섹션이 다음과 같이 설정되었습니다.

<httpErrors mode="Custom"> 

"웹 서버에서 디버깅을 시작할 수 없음"문제가 발생했습니다. "DetailedLocalOnly"의 이전 값으로 다시 설정하면 문제가 해결되었습니다. 좀 더 깊이 파헤쳐 보면 실제로 401 오류 설정이 원인이라는 것을 알았습니다.

<httpErrors mode="Custom"> 
    <error statusCode="401" prefixLanguageFilePath="" path="/masterpages/500.html" responseMode="ExecuteURL" />
<httpErrors mode="Custom"> 

401 오류 줄을 주석 처리하면 문제도 해결되었으므로 사용자 지정 오류 처리를 유지하고 디버깅을 시작할 수 있기 때문에 문제를 해결했습니다.

왜 이런 일이 일어나는지 아직 모르겠습니다.


Plase 검사 응용 프로그램 풀. 중지 된 경우. 다시 시작하십시오.


DNN (Dot Net Nuke) 모듈을 디버깅하는 데 동일한 문제가 발생했습니다. 컴파일 debug = "true"가 필요하다는 것이 밝혀졌습니다.

<compilation debug="true" strict="false" targetFramework="4.0"> 

web.config에서. 기본적으로 DNN에서는 false입니다. 원본 출처 : http://www.dnnsoftware.com/forums/forumid/111/postid/189880/scope/posts


다시 쓰기 모듈을 구현 한 후에도 똑같은 문제가 있습니다.

web.config 파일에서 다시 쓰기 항목을 제거하면 디버깅이 완벽하게 작동합니다.

이 문제를 해결하기 위해 다음과 같이 디버깅하는 동안 다시 쓰기 태그를 주석 처리합니다.

<rewrite>
    <rules>
        <rule name="LowerCaseRule_1" stopProcessing="true">
            <match url="[A-Z]" ignoreCase="false" />
            <action type="Redirect" url="{ToLower:{URL}}" />
        </rule>
        <rule name="RedirectDefault.aspx_1" stopProcessing="true">
            <match url="(.*)default.aspx" />
            <action type="Redirect" url="{R:1}" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

그런 다음 디버깅 후 주석을 제거합니다.

Must be an bug in visual studio 2010.


I got the same error since Application pool was stopped in IIS. After starting the App Pool, the issue was resolved.


Here is what I did to clear the error you noted. Locate the web folder for the app within the file system, go to Properties=>Security click the Advanced button then click the Owner tab, click the Edit button and change the owner (with the correct permissions) of the folder and checked the "Repalce owner on subcontainers and objects" checkbox. Click "Apply" and then I was in business (able to debug).

Hope this works for someone else.


Just finally fixed this for my single solution that was having this. Two of the projects in the solution were set as sites in IIS. I went in and enabled ASP.Net Impersonation under Authentication for both projects...and VIOLA! FINALLY, no more of this annoying error!


I was getting the same error message in VS 2012, but was not running as Administrator. When I ran the app as administrator, I got a different and slightly more helpful message (which I was able to figure out). HTH


If App Pool has trouble restarting or simply doesn't want to restart, verify if windows made recent update on ASP.NET v4.0 or other App Pool. That is what happend in my case. I simply restarted my computer, then restarted ASP.NET v4.0 App Pool and everything was working again!


Dan,

In addition to Aaron's suggestions, try the following

  • Check that integrated windows authentication is selected in your IIS website
  • Can you debug using Cassini instead of IIS?

Had the same problem with Windows 10 when turned on all IIS windows features. Switched to Windows 8.1 and got problem again. The root was in web site name "http://MySite.local" (not related to OS version).

And solution is simple

  • Edit hosts file in %SystemRoot%\System32\drivers\etc\

  • Add line with ip binding: 127.0.0.1 MySite.local


I had this error come up today due to a defect in code that was posting back a tremendous amount of times causing IIS to be flooded with requests. This essentially locked up IIS and so when I tried to debug, it 'timed out' trying to start the debugger. I simply restarted IIS, which took a few minutes, and it solved the issue.

I sure do wish this error was less generic, seems like there are several different ways to produce it.


I had the same problem in Visual Studio 2012 and 2013 on Windows 8.1. For me the fix was to add Windows Authentication to IIS using 'Turn Windows features on or off'

Turn Windows features on or off screenshot


Be sure your site's Application Pool uses the correct framework version. I got the "Unable to start debugging" error on an ASP.Net 2005 site. It was incorrectly using the DefaultAppPool on Windows 7 (which I believe was using .Net Framework 4). I created a new a App Pool based on .Net Framework 2 and assigned it to the problem web site. After that debugging worked fine.


Check if your website on IIS is not stop.

I fixed it put my web site to run. :D


I had this problem and eventually realized that I ASP.net is not registered properly with IIS. This can happen when IIS server is installed before Visual Studio. To fix this issue, use the command aspnet_regiis -i Further information can be found in the link


had same issue. If you have SSL certificate installed on IIS and if you are trying to debug it from Visual Studio then you need to set your application on IIS to ignore certificate.


I had the same issue and found that it was caused because i had a character mistakenly typed in my Web.config after the end tag. My Web.config looked like this right at the end: </section>h. The "h" was an extra character after the closing tag.


remove sting like this: targetFramework="4.0" in web.config or change AppPool to appropriate framework version.


Uninstalling the IIS UrlScan Extension solved the problem for me.


I had faced the same problem but it was on Visual studios's own web development server instead of IIS.The get around is to uncheck the option in Web tab under project properties, Apply server settings to all users(store in project file.).Hope it will save some one's valuable time.


I had the same problem. All the answers above did not work for me. The solution was to delete the bin and obj folder manually.


I found this issue too but it was most similar to what @Kirk explained and URL rewriting.

In my case someone had checked in this change to the web.config file for a MVC project:

<system.webServer>
    <security>
        <requestFiltering>
            <fileExtensions>
                <add fileExtension=".aspx" allowed="false" />
            </fileExtensions>
        </requestFiltering>
    </security>
</system.webServer>

Because .aspx file extensions were not allowed on the web server, the /debugattach.aspx URL was denied, preventing the debugger from running. Once I removed this configuration it worked again.


I had the same problem when I created application in Visual Studio, and then in properties created virtual directory for use with local IIS. If someone has this error it is because VS creates application under wrong AppPool, i.e. under AppPool which doesn't suit your needs.
If this is the case, go to IIS Manager, select App, Go to Basic settings and change AppPool for App and you are good to go.


I got this same error recently and in my case it turned out that there were duplicate MIME types. I had recently added two that didn't show up in the list initially. IIS let me add them and it was only when I decided to check the MIME types for the site again as part of my diagnostic process that I got an error in IIS as well. It referenced duplicates in web.config. Once I went back into the web.config file I noticed that a new section called had been added, which included the two recently-added MIME types. Deleted that section and life is good again! Hoping this may help others who haven't managed to fix the issue with any of the other suggestions.

참고URL : https://stackoverflow.com/questions/4653236/unable-to-start-debugging-on-the-web-server-could-not-start-asp-net-debugging-v

반응형