2011-05-10 2 views
0

J'ai un WCF dans VB qui doit être hébergé dans un service Windows. J'ai géré le programme d'installation afin que le service s'installe réellement. Mais, lorsque j'essaie de démarrer le service, j'obtiens l'erreur suivante:Problèmes de point de terminaison WCF

"Le service sur l'ordinateur local démarré puis arrêté Certains services s'arrêtent automatiquement s'ils n'ont aucun travail à effectuer, par exemple, les journaux de performance et Service d'alertes. "

cheking l'Observateur d'événements me donne les éléments suivants:

service ne peut pas être démarré. System.InvalidOperationException: impossible de trouver une adresse de base qui correspond au schéma http pour le noeud final avec la liaison WSHttpBinding. Les schémas d'adresse de base enregistrés sont []. à ... à ... à ...

Ce qui, je suppose, mettrait mon problème quelque part ici:

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
<system.diagnostics> 
    <sources> 
     <!-- This section defines the logging configuration for My.Application.Log --> 
     <source name="DefaultSource" switchName="DefaultSwitch"> 
      <listeners> 
       <add name="FileLog"/> 
       <!-- Uncomment the below section to write to the Application Event Log --> 
       <!--<add name="EventLog"/>--> 
      </listeners> 
     </source> 
    </sources> 
    <switches> 
     <add name="DefaultSwitch" value="Information" /> 
    </switches> 
    <sharedListeners> 
     <add name="FileLog" 
      type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" 
      initializeData="FileLogWriter"/> 
     <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --> 
     <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> 
    </sharedListeners> 
</system.diagnostics> 


    <system.serviceModel> 
<services> 
    <service name="ExStreamWCF.Service1" behaviorConfiguration="ExStreamWCF.Service1Behavior"> 
    <!-- Service Endpoints --> 
    <endpoint address="" binding="wsHttpBinding" contract="ExStreamWCF.IService1"> 
     <!-- 
      Upon deployment, the following identity element should be removed or replaced to reflect the 
      identity under which the deployed service runs. If removed, WCF will infer an appropriate identity 
      automatically. 
     --> 
     <identity> 
     <dns value="localhost"/> 
     </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
    </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="ExStreamWCF.Service1Behavior"> 
     <!-- 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> 
    </system.serviceModel> 



</configuration> 

Cependant, comme un noob totale Je ne sais pas ce qui pourrait possible se tromper. Tout cela est vraiment nouveau pour moi. Toute direction serait grandement appréciée!

Merci, Jason

fdsa

Répondre

0

ajouter baseaddress comme:

<host>   
    <baseAddresses>    
    <add baseAddress="net.tcp://localhost/ExStreamWCF" /> 
    </baseAddresses>   
</host> 
0

Puisque vous vous auto-hébergement besoin de spécifier une adresse pour votre service à écouter. Si vous êtes hébergé dans IIS, IIS contrôle l'adresse, mais dans des scénarios d'auto-hébergés, vous devez fournir l'adresse, dans cet élément de configuration:

<endpoint address="" binding="wsHttpBinding" contract="ExStreamWCF.IService1"> 
Questions connexes