Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

web services - WCF not using computer name instead of domain name when viewing MyService.svc?wsdl

My WCF serice seems to be using the computer-name instead of the domain name. When I view the MyService.svc?wsdl link it is showing my computer name.

Where do I add my domain name in the web.config? Endpoint address, baseaddress or identity?

Note: I am using SSL so it has to be https://www.example.com/myservice.svc

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

WCF 4.0 has solved this issue in some instances with a new config option that use Request Headers:

    <behaviors>
        <serviceBehaviors>
            <behavior name="AutoVaultUploadBehavior">
                <useRequestHeadersForMetadataAddress>
                    <defaultPorts>
                        <add scheme="https" port="443" />
                    </defaultPorts>
                </useRequestHeadersForMetadataAddress>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...