IIS Configuration WCF Service

Source: Internet
Author: User

In the university platform, the service side of each system provides interface through WCF, if you use these interfaces can use VS release, call this local interface on the client. However, to use IIS for other purposes, the IP address and port number are published.

First, vs release WCF

1. For the VS local Publishing service, it is generally possible to publish successfully as long as there is no problem with the program.

2. The client can invoke the server's resources by placing the service address that was successfully published in the client's configuration file.

Second, IIS publishes WCF

1. (1) Enable IIS

IIS publishes WCF and requires some features of IIS to be enabled in advance, as follows:

(2). Add a site to publish

(3) After adding a successful, you need to change the security permissions of the folder to "Full Control", then browse to the right URL to see our published server address.

(4) After the release, you can also make some modifications and re-binding of the site, and other operations


2.(1) Problem: in the actual release of the installation steps to release the line, but unfortunately a few things configured IIS, so that the following error occurred

or click on the. svc directly to let the download file, open after it is such (directly to the SVC parsed into a string)

(2) Missing configuration: Two configurations are missing in my program, MIME type, handler mapping, respectively


1). In the MIME type, see if there is a. svc, and if not, add


The above configuration, in fact, in the WCF configuration file under the system.webserver of a node function, the two can be one (in general, WCF can be automatically generated)

<staticContent>   <mimemap fileextension= ". Svc" mimetype= "Application/octet-stream"/></ Staticcontent>
2). Check the handler mappings for the missing. SVC Management handler, if not added (this SCF is not automatically generated)


Summary:

Using IIS to configure the problem of WCF before, there was no solution, this time by asking others to finally solve the problem, from the process also learned that their own learning problems, especially when encountering problems, not carefully read the error hints (or do not understand), will not find online related solutions and so on. So later in the encounter for the time, the first to learn to see the error hint, if you do not understand the Internet to find out the cause of the error, or to find out which part of the problem, is the problem of the program or IIS. If it is a problem with the program, then put the program on someone else's computer to test whether some can be published with IIS, if it is the problem of IIS, you can publish a successful program on your computer to publish a try. Furthermore, we should learn to use the experience of predecessors and summarize it in time.



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

IIS Configuration WCF Service

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.