在服务器2003上的iis6上安装时找不到wcf服务

时间:2011-09-07 18:14:22

标签: wcf iis-6

我已经使用VS 2010制作了WCF服务。我正在尝试使用iis6在服务器2003上安装。当我尝试浏览svc文件时,我得到:

  

作为Service属性提供的类型'wcfBkesher.EvalService'   ServiceHost指令中的值,或在配置中提供的值   元件   system.serviceModel / serviceHostingEnvironment / serviceActivations可以   找不到。描述:期间发生了未处理的异常   执行当前的Web请求。请查看堆栈跟踪   有关错误及其来源的更多信息   码。

     

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

     

来源错误:

     

执行期间生成了未处理的异常   当前的网络请求。有关的来源和位置的信息   可以使用下面的异常堆栈跟踪来识别异常。

     

堆栈追踪:

     

[InvalidOperationException:类型'wcfBkesher.EvalService',   作为ServiceHost指令中的Service属性值提供,   或在配置元素中提供   system.serviceModel / serviceHostingEnvironment / serviceActivations可以   找不到。]
  System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(字符串   constructorString,Uri [] baseAddresses)+52174
  System.ServiceModel.HostingManager.CreateService(字符串   normalizedVirtualPath)+1440
  System.ServiceModel.HostingManager.ActivateService(字符串   normalizedVirtualPath)+44
  System.ServiceModel.HostingManager.EnsureServiceAvailable(字符串   normalizedVirtualPath)+615

     

[ServiceActivationException:服务'/bkwcf/EvalService.svc'   由于编译期间的异常,无法激活。该   异常消息是:类型'wcfBkesher.EvalService',提供为   ServiceHost指令中提供的Service属性值   在配置元素中   system.serviceModel / serviceHostingEnvironment / serviceActivations可以   找不到..] System.Runtime.AsyncResult.End(IAsyncResult结果)   687598
  System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult的   结果)+190
  System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication的   context,String routeServiceVirtualPath,Boolean flowContext,Boolean   ensureWFService)+234
  System.ServiceModel.Activation.HttpModule.ProcessRequest(对象   发件人,EventArgs e)+355
  System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,   布尔和放大器; completedSynchronously)+75

我已将asp.net选项卡设置为版本4 我的svc文件:

<%@ ServiceHost Language="C#" Debug="true" Service="wcfBkesher.EvalService" CodeBehind="EvalService.svc.cs" %>

我的web.config:

<?xml version="1.0"?>
<configuration>

       <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel><services>
   <service name="wcfBkesher">
      <endpoint address="http://mywebaddress/bkwcf/.EvalService.svc" 
    binding="basicHttpBinding" bindingConfiguration="" contract="wcfBkesher/IEvalService" 
    listenUri="/" isSystemEndpoint="true" />       
    </service>    
</services> 
    <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"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
<bindings>
       <basicHttpBinding>
          <binding maxBufferSize="100"
                   maxReceiveBufferSize="100" />
       </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 



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

</configuration>

0 个答案:

没有答案