<system.serviceModel> <services> <service name="xxxxx.xxxxxx"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="aHttpBinding" contract="xxxxx.xxxxxx" name="xxxxx.xxxxx"></endpoint> </service> </services> <bindings> <basicHttpBinding> <binding name="aHttpBinding" maxReceivedMessageSize="1000000"> <readerQuotas maxStringContentLength="1000000" /> <security mode="Transport"> <!---------------------------------------------此處改成None-----------------------> <transport clientCredentialType="None"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <!-- 爲避免泄漏元數據信息,請在部署前將如下值設置爲 false --> <serviceMetadata httpsGetEnabled="false" /> <!-- 要接收故障異常詳細信息以進行調試,請將如下值設置爲 true。在部署前設置爲 false 以免泄漏異常信息 --> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel>
緣由不知道爲何,把mode改成None就能夠spa