我有一个WCF服务,其地址与此类似:https://subdomian.domain.com/Service.svc/。它可以按各种方式工作,但是当客户端添加服务引用时,客户端的端点地址会生成: https://subdomian.domain.com/的 Service.svc / Service.svc
任何想法为什么?提前致谢。
这是我的配置:
<serviceBehaviors>
<behavior name="SubdomainBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="XXXX" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="subdomain.domain" behaviorConfiguration="SubdomainBehavior">
<endpoint address="SubdomainService.svc" binding="basicHttpBinding" bindingConfiguration="BasicSecureService" contract="subdomain.IsubdomainService">
<identity>
<dns value="" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://subdomain.domain.com" />
</baseAddresses>
</host>
</service>
</services>