C# “我的web服务”的WCF中出错 “/LogCollection”应用程序中出现服务器错误。

C# “我的web服务”的WCF中出错 “/LogCollection”应用程序中出现服务器错误。,c#,wcf,C#,Wcf,作为服务提供的类型“LogCollection.LogCollection” ServiceHost指令中的属性值,或 配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations可以 找不到。描述:测试期间发生未处理的异常 当前web请求的执行。请查看堆栈跟踪 有关错误以及错误来源的详细信息,请参阅 代码 异常详细信息:System.InvalidOperationException:类型 “LogCollectio

作为服务提供的类型“LogCollection.LogCollection” ServiceHost指令中的属性值,或 配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations可以 找不到。描述:测试期间发生未处理的异常 当前web请求的执行。请查看堆栈跟踪 有关错误以及错误来源的详细信息,请参阅 代码

异常详细信息:System.InvalidOperationException:类型 “LogCollection.LogCollection”,作为服务属性值提供 在ServiceHost指令中,或在配置元素中提供 system.serviceModel/serviceHostingEnvironment/serviceActivations可以 找不到

源错误:

在执行过程中生成了未处理的异常 当前web请求。关于货物来源和位置的信息 可以使用下面的异常堆栈跟踪来识别异常

堆栈跟踪:

[InvalidOperationException:类型为'LogCollection.LogCollection', 作为ServiceHost指令中的服务属性值提供, 或在配置元素中提供 system.serviceModel/serviceHostingEnvironment/serviceActivations可以 找不到。]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(字符串 构造函数字符串,Uri[]基地址)+59766
System.ServiceModel.HostingManager.CreateService(字符串 规范化虚拟路径,事件跟踪活动EventTraceActivity)+1434
System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo,EventTraceActivity EventTraceActivity)+52
System.ServiceModel.HostingManager.EnsureServiceAvailable(字符串 规范化虚拟路径,EventTraceActivity EventTraceActivity)+598

[ServiceActivationException:服务 由于出现错误,无法激活“/LogCollection/LogCollection.svc” 编译期间发生异常。异常消息为:类型 “LogCollection.LogCollection”,作为服务属性值提供 在ServiceHost指令中,或在配置元素中提供 system.serviceModel/serviceHostingEnvironment/serviceActivations可以 找不到..]System.Runtime.AsyncResult.End(IAsyncResult结果) +499660 System.ServiceModel.Activation.HostedHttPrequesStatAsyncResult.End(IAsyncResult 结果)+178
System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar)+350830
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar)+9668129


版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.0.30319.18213

为什么我会犯这个错误? 我的配置文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="LogCollection.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <applicationSettings>
  </applicationSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
    <pages controlRenderingCompatibilityVersion="4.0" />

    </system.web>
  <system.serviceModel>

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false" />          
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https"/>
      <add binding="basicHttpBinding" scheme="http"/>
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"  />

  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>  


错误非常清楚:“找不到类型“
LogCollection.LogCollection
”。请确保配置了服务实现的全名。在哪里配置?你能确切地告诉我该怎么做吗?明白了,在标记文件中,名称空间和类名都是相同的。谢谢