0

Web ブラウザーを使用して、作成した新しいサービスをテストしようとしていますが、うまくいきません。URLにアクセスするたびに、空白になります。これが私の設定です。誰でも私が持っているエラーを見ることができますか?

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

  <connectionStrings>
    <add name="APerson"
         connectionString="data source=|DataDirectory|Database.sdf"
         providerName="System.Data.SqlServerCe.4.0"/>
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="HighTech_API_Service" behaviorConfiguration="ServiceDebug">
        <endpoint
              behaviorConfiguration="web"
              address="http://localhost:54107/jsonservice"
              binding="webHttpBinding"
              contract="Some_API_Service.IJsonService" />
        <endpoint
           address="mex"
           binding="mexHttpBinding"
           contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceDebug">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
        </behavior>
        <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="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

WCF テスト クライアントを使用すると、サービスを正常に操作できますが、URL を介して操作する必要があります。

4

1 に答える 1

0

これを機能させるために、サービスをホストするように IIS をセットアップしました...

于 2012-08-30T14:23:50.673 に答える