Wcf https Configuration

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.