0
我正在嘗試使用Web瀏覽器來測試我提供的新服務,但沒有運氣。每當我點擊URL時,它就會變成空白。這裏是我的配置任何人都可以看到我有什麼錯誤?WCF通過網絡瀏覽器使用服務
<?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來完成。