2017-04-18 07:52:04 +08:00
## System.ServiceModel.Web.WebServiceHost object no longer adds a default endpoint
2017-04-21 02:19:05 +08:00
2017-04-06 04:52:19 +08:00
### Scope
Minor
2017-04-21 02:19:05 +08:00
2017-04-06 04:52:19 +08:00
### Version Introduced
4.5
2017-04-21 02:19:05 +08:00
2017-04-06 04:52:19 +08:00
### Source Analyzer Status
Planned
### Change Description
2017-04-21 02:19:05 +08:00
The < xref:System.ServiceModel.Web.WebServiceHost >
object no longer adds a default endpoint if an explicit endpoint has been added
by application code.
2017-04-06 04:52:19 +08:00
- [ ] Quirked
- [ ] Build-time break
2017-04-21 02:19:05 +08:00
2017-04-06 04:52:19 +08:00
### Recommended Action
2017-04-21 02:19:05 +08:00
If users will expect to be able to connect to a default endpoint and other
explicit endpoints have been added to the
< xref:System.ServiceModel.Web.WebServiceHost ? displayProperty = name > , default
endpoints should also be added explicitly (using < xref:System.ServiceModel.ServiceHostBase.AddDefaultEndpoints ? displayProperty = name > ).
2017-04-06 04:52:19 +08:00
### Affected APIs
* `M:System.ServiceModel.ServiceHost.AddServiceEndpoint(System.Type,System.ServiceModel.Channels.Binding,System.String)`
* `M:System.ServiceModel.ServiceHost.AddServiceEndpoint(System.Type,System.ServiceModel.Channels.Binding,System.Uri)`
* `M:System.ServiceModel.ServiceHost.AddServiceEndpoint(System.Type,System.ServiceModel.Channels.Binding,System.String,System.Uri)`
* `M:System.ServiceModel.ServiceHost.AddServiceEndpoint(System.Type,System.ServiceModel.Channels.Binding,System.Uri,System.Uri)`
* `M:System.ServiceModel.ServiceHost.AddServiceEndpoint(System.Type,System.ServiceModel.Channels.Binding,System.Uri,System.Uri)`
* `M:System.ServiceModel.ServiceHostBase.AddServiceEndpoint(System.ServiceModel.Description.ServiceEndpoint)`
* `M:System.ServiceModel.ServiceHostBase.AddServiceEndpoint(System.String,System.ServiceModel.Channels.Binding,System.String)`
* `M:System.ServiceModel.ServiceHostBase.AddServiceEndpoint(System.String,System.ServiceModel.Channels.Binding,System.Uri)`
* `M:System.ServiceModel.ServiceHostBase.AddServiceEndpoint(System.String,System.ServiceModel.Channels.Binding,System.String,System.Uri)`
* `M:System.ServiceModel.ServiceHostBase.AddServiceEndpoint(System.String,System.ServiceModel.Channels.Binding,System.Uri,System.Uri)`
### Category
Windows Communication Foundation (WCF)
2017-04-21 02:19:05 +08:00
2017-04-06 04:52:19 +08:00
<!--
### Notes
2017-04-21 02:19:05 +08:00
If an explicit endpoint is added, then the expected default endpoint will not exist. An analyzer can look for explicit endpoints being added without a corresponding call to add default endpoints. A code fix is possible here, too, by just calling < xref:System.ServiceModel.ServiceHostBase.AddDefaultEndpoints ? displayProperty = name > . Note, though, that this is probably just informational since it's often not something that needs fixed.
2017-04-06 04:52:19 +08:00
Source analyzer status: Pri 2, Planned
-->
2017-04-18 07:52:04 +08:00
<!-- breaking change id: 30 -->