Deploy in IIS

Oct 8, 2014 at 12:45 PM
Edited Oct 8, 2014 at 2:50 PM
Hi everyone!

I try to publishing the service but my PessoasServices.svc not open in my test deploy. I not have a phishical file. Its is necessary to create? How?


The error is 404.

My web.config.


<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="DefaultServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
  <serviceActivations>
    <add factory="System.ServiceModel.Activation.ServiceHostFactory" 
         relativeAddress="./PessoasServices.svc" 
         service="WCF.Services.PessoasServices"/>
  </serviceActivations>
</serviceHostingEnvironment>
<services>
  <service behaviorConfiguration="DefaultServiceBehavior" name="WCF.Services.PessoasServices">
    <endpoint binding="basicHttpBinding" bindingConfiguration=""
      name="basicHttpPessoaService" contract="WCF.Contract.IPessoas" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
</system.serviceModel>
Coordinator
Oct 23, 2014 at 3:51 AM
Hi,

You do not need to have a physical .svc file since it is using .NET 4.0 File-less activation.

To show metadata, you need to have the behavior section defined in your serviceModel:
<behaviors>
      <serviceBehaviors>
        <behavior name="DefaultServiceBehavior">
          <!-- 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="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
You can test to see whether your service is accessible via your browser by specifying the full http path to your service.

Hope this helps.

Hugs,
Serena