Próbowałem wykonać prostą, restful usługę wcf, która zwróci JSON. Działa, jeśli uruchomię go na serwerze programistycznym. Jednak jeśli wdrożyć go na IIS 7.5, będę miał ten błąd kiedy obejrzano go za pomocą http://localhost:70Błąd IIS 7.5 dla Restful WCF 4.0
Błąd HTTP 500,19 - Serwer wewnętrzny Błąd Żądana strona nie może być obejrzano ponieważ związane dane konfiguracyjne strona jest niepoprawna.
Config Błąd Sekcja konfiguracji „standardEndpoints” nie można odczytać ponieważ brakuje sekcji deklarację
Oto mój plik konfiguracyjny: Jest to domyślny plik generowany przez VS2010.
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<standardEndpoints>
<webHttpEndpoint>
<!--
Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below
-->
<standardEndpoint name="LocationService" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
</configuration>
Jestem nowy w WCF specjalnie na .net 4.0 i IIS 7.5.
Czy ktoś może pomóc? Lub ktoś doświadczył tego samego i już naprawił?
Dzięki za tego człowieka , sprawdziłem i okazało się, że moja aplikacja tworzy własną pulę aplikacji, która używa asp.net 2.0 zamiast 4.0. Teraz działa. Dziękuję Ci bardzo. –
Dziękuję bardzo! –