Yesterday, a good wcf Service needs to be published to a virtual directory under the server site.
The publishing process encountered a problem: the environment on the server is https, so you need to modify the configuration file.
So I found a problem on the Internet, but the problem still persists. I found an article on the Internet
Follow the instructions above step by step.
Http://www.codeproject.com/KB/WCF/7stepsWCF.aspx
Http://www.codeproject.com/KB/WCF/WCFSSL.aspx
Step 1 add segments in Binding
<Security mode = "Transport">
<Transport clientCredentialType = "None"/>
</Security>
Step 2 Change the endpoint address to https
Third, change serviceMetadata to httpsGetEnabled.
<ServiceBehaviors>
<ServiceMetadata httpsGetEnabled = "true"/>
</ServiceBehaviors>
Finally, use makecert to add a certificate to the iis Site.
Makecert-r-pe-n "CN = compaq-jzp37md0"-B 01/01/2000-e 01/01/2050-eku 1.3.6.1.5.7.3.1-ss my-sr
LocalMachine-sky exchange-sp "Microsoft RSA SChannel Cryptographic Provider"-sy 12
The local environment is set up, and the configuration file can run normally. I was trying to move the configuration file to the server, but an error is still reported when I click the page.
After one day, the configuration is changed or an error is reported.
The protocol 'https' is not supported.
Online Search says you want to determine whether iis supports https, so I made another static page and put it under the iis Site.
If normal access is found, https is normal.
Finally, I found that the https on the original server is not set on iis, but on the vro. Through the https ing, the https is mapped to http and accept, which makes Mao need to be seed?
Then, copy the original configuration file back and modify the indentity of the endpoint.
<Identity>
<Dns value = "server domain name"/>
</Identity>
Then add baseAddresss
<Host>
<BaseAddresses>
<Add baseAddress = "https: // server domain name"/>
</BaseAddresses>
</Host>
The problem is solved with the sauce. Call Mark to prevent another mistake.