Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht Gefunden. WCF-Web-Ausnahme

Hallo, ich habe eine WCF-sync-Dienst hosting auf IIS7 auf meinem server, kann ich den Zugriff auf den URL im browser, Eigentlich baute ich den WCF-Dienst und später fügte ich eine wcf-service-website auf meine Lösung, indem meine wcf-Dienstverweis. und im service.svc-Datei, die ich erwähnt den besonderen service. die web -.config im wcf Website sieht aus wie

<configuration>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="SimGuru_WCF.SimGuruDBCacheSyncService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
          contract="SimGuru_WCF.ISimGuruDBCacheSyncContract">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <!-- 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>

Wenn ich versuche auf den Dienst zuzugreifen, es ist mir "Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden", aber noch kann ich den Zugriff auf den service über eine URL
Und app.config-Datei ist

<configuration>

  <configSections>
  </configSections>
  <connectionStrings>
    <add name="SimGuru_WCF.Properties.Settings.ServerSimGuru_RetailConnectionString"
      connectionString="Data Source=SIMGURU\SQLEXPRESS;Initial Catalog=SimGuru_Retail;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
   <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_ISimGuruDBCacheSyncContract" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="SimGuru_WCF.SimGuruDBCacheSyncServiceBehavior"
        name="SimGuru_WCF.SimGuruDBCacheSyncService">
        <endpoint address="" binding="basicHttpBinding" contract="SimGuru_WCF.ISimGuruDBCacheSyncContract">
          <identity>
            <dns value="10.0.1.42"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://10.0.1.42:8731/SimGuruDBCacheSyncService/" />
          </baseAddresses>
          <timeouts closeTimeout="00:01:10" openTimeout="00:09:00" />
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SimGuru_WCF.SimGuruDBCacheSyncServiceBehavior">
          <!-- 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>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData="c:\log\Traces.svclog"  />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>

kann jemand bitte helfen, mich zu Sortieren, dieses Problem aus

Vielen Dank im Voraus

  • Fügen Sie bitte die config des service-client.
  • Eigentlich baute ich beide server und cline zinn meinem lokalen system, das ist ein wcf-sync-Dienst mit lokalen Datenbank-cache. Jetzt habe ich dazu noch eine wcf-service-website und zu, dass ich Hinzugefügt Verweis auf wcf-Projekt, das ich in meinen server verschiedene computer beim Zugriff auf den service ist es mir dieser Fehler
  • Ersetzen 10.0.1.42 durch localhost
  • Jetzt bin ich immer {"Der Remoteserver hat einen Fehler zurückgegeben: (500) Internal Server Error."} Fehler nach dem Austausch 10.0.1.42 mit dem-server IP-Adresse
InformationsquelleAutor Srikanth | 2012-08-30
Schreibe einen Kommentar