Laden...

[erledigt] WCF Inhaltstyp Fehler am Client

Erstellt von Pico1184 vor 13 Jahren Letzter Beitrag vor 13 Jahren 5.224 Views
Pico1184 Themenstarter:in
223 Beiträge seit 2009
vor 13 Jahren
[erledigt] WCF Inhaltstyp Fehler am Client

Hallo zusammen,

habe einen WCF Service mit folgender Konfiguration:

 <system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBindingConfiguration" maxReceivedMessageSize="9965536"> <readerQuotas maxArrayLength="9965536" />
</binding>
</basicHttpBinding>
<ws2007HttpBinding>
<binding name="WS2007BindingConfiguration" maxReceivedMessageSize="9965536"> <readerQuotas maxArrayLength="9965536" />
</binding>
</ws2007HttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceDiscovery />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="VisualControl.DisribitedServices.StudioService">
<clear />
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingConfiguration" name="BasicBindingForSilverlightClients" contract="VisualControl.DistributedServices.StudioService.IStudioService" listenUriMode="Explicit"/>
<endpoint address="WS2007" binding="ws2007HttpBinding" bindingConfiguration="WS2007BindingConfiguration" name="WS2007ForIntranetClients" contract="VisualControl.DistributedServices.StudioService.IStudioService" />
<!--UPD discovery endpoint-->
<endpoint name="DiscoveryEndpoint" listenUriMode="Explicit" kind="udpDiscoveryEndpoint" /> </service>
</services>
<diagnostics etwProviderId="217324ec-21d1-4782-bd9e-75f32b5fabc0">
<endToEndTracing propagateActivity="true" messageFlowTracing="true" />
</diagnostics>
</system.serviceModel>

und einen Client mit folgender Konfiguration:


<configuration>
<appSettings>
<add key="discovery_wcf_services" value="false"/>
</appSettings>
<system.serviceModel>
<bindings>
<ws2007HttpBinding>
<binding name="WS2007ForIntranetClients" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="99965536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="99916384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default"/>
</security>
</binding>
</ws2007HttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:7407/StudioService.svc/WS2007"
binding="ws2007HttpBinding" bindingConfiguration="WS2007ForIntranetClients"
contract="Proxies.StudioService.IStudioService" name="WS2007ForIntranetClients">
</endpoint>
</client>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

wenn ich nun den Client connecten will bekommen ich folgende Fehlermeldung:

Der Inhaltstyp "application/soap+xml; charset=utf-8" wurde von Dienst"http://localhost:7407/StudioService.svc/WS2007" nicht unterstützt.Möglicherweise stimmen Client- und Dienstbindungen nicht überein.

mein discovery funktioniert ebenfalls nicht, der Client findet keinen Endpunkt!

Vielleicht kann mir jemand von euch helfen...sehe vor lauter Bäumen den Wald nicht!

Grüße Pico

S
902 Beiträge seit 2007
vor 13 Jahren

Hallo,

hast du irgendwo eine BaseAdress hinterlegt?
Denn deine endpoints gehen ja nur auf basic bzw ws2007.

mfg
serial

6.911 Beiträge seit 2009
vor 13 Jahren

Hallo,

hast du die Fehlermeldung in die Forensuche und/oder andere Suchmaschinen eingegeben?
Diese Meldung ist sowas wie ein Standardfehler 😉

mfG Gü

Stellt fachliche Fragen bitte im Forum, damit von den Antworten alle profitieren. Daher beantworte ich solche Fragen nicht per PM.

"Alle sagten, das geht nicht! Dann kam einer, der wusste das nicht - und hat's gemacht!"

Pico1184 Themenstarter:in
223 Beiträge seit 2009
vor 13 Jahren

<endpoint address="http://localhost:7407/StudioService.svc/basic" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBindingConfiguration" name="BasicBindingForSilverlightClients"
contract="VisualControl.DistributedServices.StudioService.IStudioService" listenUriMode="Explicit" />
<endpoint address="http://localhost:7407/StudioService.svc/WS2007"binding="ws2007HttpBinding"
bindingConfiguration="WS2007BindingConfiguration"name="WS2007ForIntranetClients"
contract="VisualControl.DistributedServices.StudioService.IStudioService" />

habs mal direkt in dei web.config geschrieben, da kommt allerdings die gleiche Fehlermeldung!

@gfoidl
Klar ich hab danach gegoogelt...aber irgendwie nix gescheites gefunden!

Möglicherweise stimmen Client- und Dienstbindungen nicht überein. Ich denke doch, dass meine Bindings stimmen.....??????Grüße Pico

Pico1184 Themenstarter:in
223 Beiträge seit 2009
vor 13 Jahren

arrrrgggggggggg.....hab den Fehler gefunden!

Das Problem war, dass ich in der .svc Datei einen anderen ServiceName angegeben hatte als in der web.config unter <service name="">

Danke euch trotzdem!!

So blöd kann man sein!

Grüße Pico