Technology paste technology to directly talk about technology, courtesy words I also don't say, you crossing forgive.
Follow the park master Step by step release success, ecstatic occasion, send a souvenir memorial.
Needless to say, the wrong place, but also hope that everyone actively pointed out the common progress. haha ~ ~ ~
First, create a WCF class library and a WCF application (similar to WinForm, where WCF applications can set Startup items (startup page))
To delete unused files in a WCF application, we refer to the services in the WCF Service library. It automatically adds the deletions. Specifically as shown (if you do not delete Service1.svc.cs you will find the double-click can not open service1.svc, here to explain the Service1.svc.cs file is service1.svc of the background code, is the implementation of IService1, we do not need)
Add a reference to the WCF service library
And then you can open service1.svc.
The default service points to this project and is modified to point to the service in the class library
Next configure WCF, right-click the Web. config file that we want to configure, edit the WCF configuration
If there is no service on that node, create a new service and browse to the service in the WCF Service library as shown in
Click to open Step by step down, no need to make too many settings, will be in the configuration window can be set.
After the configuration is complete, make sure that the endpoint is set as shown
Remember to save the settings oh.
It is best to compile ctrl+shift+b and develop good habits. Then F5 debugging will find that the service is already available. You can also see the effect by right-clicking in the browser on the service file. (see this page on the success of the half)
These are only viewed in the VS self-contained ASP. NET Development Server. Our purpose is published to IIS.
There is a WCF application on the right-click property to view the Web, tick use local IIS server
Remember to click Create virtual directory OH. A virtual directory is then added to the IIS Web site to map your application. View IIS Manager
In VS2010, if you run the following error, most of the errors occur because of an IIS application pool configuration error. In IIS Manager, select your own Web site, select basic settings, and see if the application pool is enabled. NET version is consistent with the project.
Also right-browsing service1.svc in IIS, and most of the errors shown are due to IIS configuration errors.
The Service.svc browsing effect after a successful configuration is the same as the effect in Vs2010.
This indicates that WCF was successfully published on IIS. You can also test with the VS own WCF test client.
Type the WcfTestClient command (part-case)
Cheese, rookie just graduated, the first time to write a blog, there must be a lot of bad writing, not fluent place. You are welcome to criticize and correct me. Please give me the courage to write down, thank you. The next step is to investigate how the client dynamically adds a WCF service reference, creating a service proxy, because the address of the WCF service is likely to change, and it is not reasonable to have the client re-add the reference compilation once for each change. People who have studied to give the younger brother a weapon, ha, thanked here.
WCF tries to create and publish IIS (with a description of the problem)