다음 구성으로 Azure에서 webrole으로 호스팅되는 WCF 응용 프로그램이 있습니다. 브라우저에서 3 개의 서비스 wsdl 중 하나에 액세스하려고하거나 프록시를 설정할 때 400 개의 잘못된 요청이 표시됩니다.이 WCF 구성으로 인해 400 번의 잘못된 요청이 발생합니까?
<?xml version="1.0"?>
<configuration>
<appSettings>
</appSettings>
<system.web>
<customErrors mode="Off"></customErrors>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<connectionStrings></connectionStrings>
<system.diagnostics>
<sharedListeners>
<add name="AzureLocalStorage" type="Example.AzureLocalStorageTraceListener, Example"/>
</sharedListeners>
<sources>
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing">
<listeners>
<add name="AzureLocalStorage" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
<listeners>
<add name="AzureLocalStorage" />
</listeners>
</source>
</sources>
</system.diagnostics>
<system.serviceModel>
<services>
<service name="Service1" behaviorConfiguration="MetaBehavior">
<endpoint address="http://example.com/service1.svc" binding="basicHttpBinding" name="basicEndpoint1" contract="IService1" />
</service>
<service name="Service2" behaviorConfiguration="MetaBehavior">
<endpoint address="http://example.com/service2.svc" binding="basicHttpBinding" name="basicEndpoint2" contract="IService2" />
</service>
<service name="Service3" behaviorConfiguration="MetaBehavior">
<endpoint address="http://pexample.com/service3.svc" binding="basicHttpBinding" name="basicEndpoint3" contract="IService3" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MetaBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true"/>
<serviceThrottling maxConcurrentSessions="90" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" aspNetCompatibilityEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
나는 내 구성이 올바르지 않다는 것을 확신하지만 잘못된 것이 무엇인지 약간의 지침이 필요합니다. 로
인터페이스
가 정의 : 당신은 잘못된 바인딩을 사용하고[ServiceContract(Name = "Service1", Namespace = "http://example.com")]
public interface IService1
{
[WebGet]
[OperationContract]
Result Create();
}
SOAP을 사용하려면 올바른 구성은 무엇입니까? – Digbyswift
비누와 WebGet을 모두 지원하도록 WCF를 구성 할 수 있습니다. 나는 대답을 넓혔다. –