An API for the additional process (ctrl+alt+p) to debug the local server interface (WCF,WEBAPI, etc.)
1 interface (WCF,WEBAPI, etc.) API is published to the local IIS Server and then uses the additional process to add your published IIS to the VS additional processes, such as searching for an API or Web application in W3wp.exe that you want to attach to the process (WCF,WEBAPI, etc.)
2 "In the above test we use the WCF API test process published in IIS, after attaching the process Ctrl+f5 run the project, request The WCF interface, you can request to the VS local WCF interface, you can debug breakpoints
two, if the project's the WCF interface code has been written to point to the online address, and you do not want to change the code, what should be done?
1 Simple: Modify the Hosts file of this address C:\Windows\System32\drivers\etc\ , change the route of IIS, if the API is requested on the line, then change the request to local
2, to the hosts file, add the routing rules to the WCF API published by Local IIS , Is that whenever you access the address on the line, it points to the local address,
127.0.0.1 API. Wcfdemo.com
3 ", IIS publishes WCF. Demo(WCF API project), need to use Port, because I am using the 127.0.0.1
This kind of debugging is a bit cumbersome, with fewer projects in the solution and less co-developers F5 debugging feel more convenient. The advantage of this kind of debugging is that we don't have to wait for the VS every slow start, and then go into the debug state, because the steps are given to IIS and VS, which is quicker to start up. And for those who are constantly being updated with the trouble of making mistakes, this approach is undoubtedly a boon. We can reduce the error of other people as much as possible.
VS Process-attached usage