0

我正在尝试使用网络浏览器来测试我所做的新服务,但没有运气。每当我点击 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 回答