15 days Proficient wcf--tenth day learn to use SvcConfigEditor to simplify configuration

Source: Internet
Author: User

  

While we were doing the WCF project, we wrote the System.ServiceModel configuration by hand, and while doing WCF's service configuration in Webconfig, VS provided most

Number of code hints, but for less familiar with the service configuration of the birds, some difficulties, and some service configuration is easy to omit, in most cases, we are a copy of the service configuration, but

After the service configuration modification changes, right ... In fact,. NET provides us with a powerful scvconfigeditor this tool-like software to help us build the WCF configuration that is

Isn't it amazing???

One: Where are the tools

Of course under the awesome Microsoft SDK, under C:\Program Files (x86) \microsoft SDKs\Windows, you'll find a lot of versions, such as:

Yes, you have seen a lot of versions, of course, I am sure to find the latest, a run chaebols, I went into the v8.0a, such as:

C:\Program Files (x86) \microsoft Sdks\windows\v8.0a\bin\netfx 4.0 Tools

You should also see, all kinds of good tools, very envious, but this one we still value svcconfigeditor.

II: How to use SvcConfigEditor

1. Double-click to open, select "File" = "New Configuration".

2. Then we select "New service" = "Fill in the service name"

3. Then we define a host for the service and click on "Host" = "new" + "fill base Address".

4. In This step, do you particularly want to see how the config configuration is generated??? Well, to satisfy your vanity, all we need is a point .

Click "Save" to select a path ...

  

5. Well, your vanity has been satisfied, and here we define endpoint, in fact, is very very simple, click "Endpoint"

= "New service endpoint", and we the symbolic filling of some address,contract,binding can be, such as:

6. Above we have defined a basichttpbinding, next, we still remember to publish a mexhttpbinding,

so that my svcutil can serve the reference, right, so the method is also very simple, continue to "new endpoint", such as:

  

7. Finally I remember the Mex need to have a behavior, let HTTP get can be accessed, with this artifact, as simple as we can

Click "Advanced" = "Service Behavior" and "new".

8. Finally we save to see what the generated appconfig is like???

What kind??? I do not need to write a word config configuration to complete the basic service configuration, if you still want to play advanced, you can try to ponder svcconfigeditor.

Well, it's almost ready to go to sleep, next we're going to study the diagnostic tools in SvcConfigEditor, it's fun, ~~~~~.

15 days Proficient wcf--tenth day learn to use SvcConfigEditor to simplify configuration

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.