Original: 15 days proficient wcf--tenth day learn to use SvcConfigEditor to simplify configuration
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