Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 无法在web服务器上启动调试_.net_Wcf_Web Services_Iis 7 - Fatal编程技术网

.net 无法在web服务器上启动调试

.net 无法在web服务器上启动调试,.net,wcf,web-services,iis-7,.net,Wcf,Web Services,Iis 7,我现在已经尝试让我们的Web服务在VisualStudio2008中使用debug运行了很长时间,但没有成功。这个项目以前工作得很好,在其他计算机上也工作得很好,我想IIS7设置可能有问题 解决方案中的主要项目是一个用作简单Web服务(svc)的WFC服务。此解决方案中的所有项目都设置为使用.NET framework 3.5 当使用内置IIS(VS)运行服务时,它似乎工作正常,但一旦使用IIS7,就会出现一个对话框并说明: 无法在web上启动调试 服务器。检查是否存在以下情况之一: 在IIS7

我现在已经尝试让我们的Web服务在VisualStudio2008中使用debug运行了很长时间,但没有成功。这个项目以前工作得很好,在其他计算机上也工作得很好,我想IIS7设置可能有问题

解决方案中的主要项目是一个用作简单Web服务(svc)的WFC服务。此解决方案中的所有项目都设置为使用.NET framework 3.5

当使用内置IIS(VS)运行服务时,它似乎工作正常,但一旦使用IIS7,就会出现一个对话框并说明:

无法在web上启动调试 服务器。检查是否存在以下情况之一:

在IIS7中执行以下操作:

  • 创建的指向Web服务的应用程序
  • 使用DefaultAppPool(.NET framework 4集成)(ApplicationPoolIdentity)
  • 浏览服务工作正常(它显示WSDL)
  • 当将DefaultAppPool更改为.NETFramework2.0时,它声明了一些关于静态文件问题的内容,但我看不到Webservice>Handler映射中缺少任何内容
  • DefaultAppPool上将Enable 32位应用程序设置为true
  • 我已按顺序从所有.net版本运行了
    aspnet\u regis
  • web.config
  • 起初,我根本无法启动web服务来解决这个问题,我不得不在web.config中注释掉几行:

    <configSections>
      <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
       <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <!--<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />-->
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
         <!--<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />-->
         <!--<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />-->
         <!--<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />-->
         <!--<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />-->
        </sectionGroup>
       </sectionGroup>
      </sectionGroup>
     </configSections> 
    
    
    
  • (scriptResourceHandler、jsonSerialization、profileService、authenticationService、roleService)


    如何通过调试运行此进程?

    如果您在IIS下运行,则不会“启动”,而是连接到正在运行的进程


    在ApplicationPool设置中,禁用ping,否则IIS将在调试会话期间回收池。

    如果您在IIS下运行,则不会“启动”,而是连接到正在运行的进程

    在ApplicationPool设置中,禁用ping,否则IIS将在调试会话期间回收池。

    在我的示例中,我使用的是“mycustomhostname.service”主机名。我必须将它添加到“C:\windows\System32\drivers\etc”中的主机文件条目中

    在我的例子中,我使用的是“mycustomhostname.service”主机名。我必须将它添加到“C:\windows\System32\drivers\etc”中的主机文件条目中


    你是在提升用户模式下运行VS吗?我不确定“提升用户模式”是什么意思,但我是以管理员的身份运行VS。是的,这就是我的意思。在这种情况下,我无能为力。它总是对我有用,但是我通常让VS为我创建IIS站点。你在提升用户模式下运行VS吗?我不确定“提升用户模式”是什么意思,但我以管理员的身份运行VS。是的,这就是我的意思。在这种情况下,我无能为力。它总是对我有用,但是我通常让VS为我创建IIS站点。
    127.0.0.1 mycustomhostname.service