モバイル アプリケーションで使用される WCF RESTful アプリケーションを作成しています。これらのサービスを localhost に展開するとすべてが機能しますが、サーバーに展開すると 1 つのサービスのみが機能し、残りのすべてのサービスで「リモート サーバーがエラー 400 の不正な要求を返しました」というエラーが表示されます。
私はこの問題について調べていましたが、正しい方法で構成されていなかったため、web.config に起因することがわかりました。これがweb.configです。助けてください。私はこの修正のために頭を壊しています。
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="Servicios.Mobile" behaviorConfiguration="ServiceBehaviour">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="wsHttp" contract="Servicios.IMobile" behaviorConfiguration="web">
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="wsHttp" maxReceivedMessageSize="50000000" maxBufferPoolSize="50000000">
<readerQuotas maxDepth="500000000" maxArrayLength="500000000" maxBytesPerRead="500000000" maxNameTableCharCount="500000000" maxStringContentLength="500000000"/>
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
ありがとう!