Erro: Não é possível iniciar a depuração no servidor Web

When you try to debug an application running on a Web server, you may sometimes get this error message:

Unable to start debugging on the Web server

If your message is longer than that, it is covered by a subtopic of this one.

If you encounter this error, there are several things to consider. First go to Things to Check, and then consider the remaining items based on your hardware and software configuration.

  • Things to Check

  • Web Applications on Remote Servers

  • Web Applications Stored in Visual SourceSafe and Using FrontPage Server Extensions

  • Manually Attaching

  • Debug Request Could Not Be Processed By the Server Due to Invalid Syntax

Things to Check

Try checking the following things:

  • Reveja os procedimentos para a configuração de ASP.NET ou ATL Server. For more information see Preparando para depurar aplicativos ASP.NET.

  • Do you have the necessary access privileges for debugging? Para obter mais informações, consulte o Requisitos de segurança seção no ASP.NET de depuração: Requisitos de sistema.

  • Are you running a version of Windows that allows the Visual Studio debugger to automatically attach to a Web application? If not, you need to launch the application without debugging and manually attach to it. (Para obter mais informações, consulte Anexando manualmente e ASP.NET de depuração: Requisitos de sistema.)

  • Does your Web application have a Web.config file?

    • Faz o modo de depuração de ativação do arquivo Web. config, definindo a debug atributo para true? For more information, see Como: Habilite a depuração de ASP.NET Applications.

    • Does the Web.config file contain any syntax errors? You can check for syntax errors by running the Web application without debugging. (From the Debug menu, choose Start Without Debugging.) If there are syntax errors in Web.config, detailed information will be displayed.

  • Did you create the project by specifying a specific IP address (100.20.300.400, for example)? Debugging a Web server requires NTLM authentication. By default, IP addresses are assumed to be part of the Internet, and NTLM authentication is not done over the Internet. To correct this problem:

    • When creating the project, specify the name of the machine on your intranet.

      - ou -

    • Add the IP address (http://100.20.300.400) to the list of trusted sites on your computer. (From the Internet Explorer Tools menu, choose Internet Options, and then select the Security tab).

    Are the necessary extensions registered on the server machine? Se não estiver, registre novamente ASP.NET conforme descrito no procedimento abaixo.

  • IIS foi instalado na máquina local (a execução de máquina Visual Studio) depois de Visual Studio foi instalado? O IIS deve ser instalado antes de Visual Studio. If it was installed afterwards, you may need to re-register ASP.NET.

    To re-register ASP.NET

    1. A partir de uma janela de prompt de comando, execute o seguinte comando: systemroot\Microsoft.NET\Framework\ versionNumber \aspnet_regiis -i

      Notacom o Windows Server 2003, você pode instalar o ASP.NET usando Adicionar ou remover o controle de programas de painel.

    2. Inserir o Visual Studio disco, execute o programa de instalação e selecione Repair/Reinstall. This step will create the wwwroot$ share and add the appropriate permissions.

  • O nome do site é mapeado para o endereço de loopback local enquanto a autenticação integrada está ligada? Consulte neste artigo do Knowledge Base para obter uma resolução.

  • Is the URL for the project start page properly specified? Are the extension and project directory correct?

  • Verifique as configurações do IIS do aplicativo da Web. For more information see Como: Verifique as configurações de propriedade do IIS.

  • Se você tiver duas versões do.NET Framework instalado no servidor Web, verifique se que a versão correta está definida nas configurações do IIS. For more information see Como: Verifique as configurações de propriedade do IIS.

Web Applications on Remote Servers

Se o aplicativo da Web estiver em um servidor remoto, primeiro verifique se você passou entre os itens na Considerações para verificar. Next check the following:

  • Computador executando o servidor IIS tem a Visual Studio componentes remotos instalado? For more information see Preparando para depurar aplicativos ASP.NET.

  • Do you have the necessary access privileges for debugging? Para obter mais informações, consulte o Requisitos de segurança seção no ASP.NET de depuração: Requisitos de sistema.

  • Are you using Terminal Server to try to debug a Web application on a remote machine? Remote debugging of native Web applications using Terminal Server is supported under Windows XP. It is not supported under Windows 2000 or Windows NT.

Web Applications Stored in Visual SourceSafe and Using FrontPage Server Extensions

Se o aplicativo da Web estiver armazenado em Visual SourceSafe e usa extensões de servidor do FrontPage como seu modo de acesso da Web, verifique o seguinte:

  • É Visual SourceSafe localizado na mesma máquina que o servidor Web/servidor do FrontPage? If so, you can debug using Integrated Authentication. Para verificar a configuração da autenticação integrada, consulte o procedimento para verificar as configurações de segurança do IIS para o aplicativo da web localizado no seguinte tópico: Como: Verifique as configurações de propriedade do IIS.

Debug Request Could Not Be Processed By the Server Due to Invalid Syntax

Às vezes, o servidor não pode processar uma solicitação de depuração devido à sintaxe incorreta. Sintaxe incorreta de solicitação pode ser causado por erros no arquivo Machine. config. Se o arquivo Machine. config define maxRequestLength para um valor absurdamente grande (40,960,000, por exemplo), este erro ocorre.

Manually Attaching

If you follow the troubleshooting steps and still get an error message when you start debugging, you may want to try debugging your application by manually attaching.

To manually attach

  1. Start the application without debugging. (From the Debug menu, choose Start Without Debugging.)

  2. Determine the name of the appropriate IIS process or worker process. Os aplicativos de servidor ATL são nomeados inetinfo.exe por padrão. Para determinar o nome do ASP.NET o processo de trabalho, consulte Como: Localize o nome do aplicativo ASP.NET Process.

    Use um dos procedimentos a seguir para determinar qual processo um ASP.NET ou aplicativo ATL Server é executado.

  3. Attach to the process determined by the preceding step. For more information, see Como: Anexar a um processo em execução.

To check which process an ASP.NET application runs under

  1. Use Visual Studio ou outro editor de texto para abrir o machine.config o arquivo para o aplicativo.

  2. Dentro do system.web nó, encontrar o ProcessModel nó e examine sua enable atributo:

    Se enable for definido como TRUE, o aplicativo é executado em aspnet_wp.exe ou w3wp.exe. (Isso também é a configuração padrão.)

    Se enable for definido como FALSE, o aplicativo é executado em Inetinfo. exe.

To check which process an ATL Server application runs under

  1. In Solution Explorer, right-click the project name and choose Properties from the shortcut menu.

  2. No <Project> Páginas de propriedade caixa de diálogo aberta a A implantação do Web pasta e escolha General.

  3. Look at the Application Protection setting.

    If the setting is Low (IIS Process), the application runs under inetinfo.exe.

    If the setting is Medium (Pooled), the application runs under a dllhost.exe process (in common with other pooled ATL Server applications).

    In the setting is High (Isolated), the application runs under a dllhost.exe process (separate from other ATL Server applications).

  4. Clique em OK para fechar a <Project> Páginas de propriedade caixa de diálogo.

Consulte também

Tarefas

Erro: O servidor Web não foi possível localizar o recurso solicitado

Referência

Depuração de aplicativos da Web: Solução de problemas e erros

Outros recursos

Preparando para depurar aplicativos ASP.NET