Skip to content

Activation and hosting

This host publishes all six services through ASP.NET route registration in Application_Start; there is no .svc file anywhere in this host, and none anywhere in the repository. The build produces two deployment variants — Internal and External — from the same route table and service code.

Activation mechanism

Aspect Finding
Mechanism Route-based (ServiceRoute)
Registered in src/WCF/SAIF.Services.WCF.Host/Global.asax.cs — Global.Application_Start
Host factory System.ServiceModel.Activation.ServiceHostFactory — one instance created at src/WCF/SAIF.Services.WCF.Host/Global.asax.cs:12 and reused for all six registrations
.svc files present None — verified by recursive enumeration of src/WCF
Route table is authoritative Yes
<system.serviceModel><services> entries 6 service elements, no <endpoint> children

Web.Base.config carries a <system.serviceModel><services> element listing the same six service classes the route table registers, and every one of those <service> elements is empty — there is not a single <endpoint> child in the file. The configuration therefore confirms service identity and supplies no operation, contract, or address information; the route table is the authoritative activation surface, and the binding comes from ServiceHostFactory defaults (basicHttpBinding, the .NET Framework default protocol mapping for http, picking up the unnamed <basicHttpBinding> binding in Web.Base.config).

Route registrations

Route Service class Address suffix Registered at
FileService SAIF.Services.WCF.Services.FileService (src/WCF/SAIF.Services.WCF.Host/Services/FileService.cs) ~/FileService src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
PreferenceService SAIF.Services.WCF.Services.PreferenceService (src/WCF/SAIF.Services.WCF.Host/Services/PreferenceService.cs) ~/PreferenceService src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
WebContext SAIF.Services.WCF.Services.WebContextService (src/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs) ~/WebContext src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
Imaging SAIF.Services.WCF.Services.ImagingService (src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs) ~/Imaging src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
Fax SAIF.Services.WCF.Services.FaxService (src/WCF/SAIF.Services.WCF.Host/Services/FaxService.cs) ~/Fax src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
Security SAIF.Services.WCF.Services.Security.SecurityService (src/WCF/SAIF.Services.WCF.Host/Services/Security/SecurityService.cs) ~/Security src/WCF/SAIF.Services.WCF.Host/Global.asax.cs

Activation diagram

The following diagram visualizes how a request reaches a service instance.

flowchart TD
    START["Application_Start"] --> FACT["var factory =<br>new ServiceHostFactory()"]
    FACT --> ADD["RouteTable.Routes.Add<br>six ServiceRoute registrations"]
    ADD --> TABLE["Route table:<br>FileService, PreferenceService, WebContext,<br>Imaging, Fax, Security"]
    REQ["Caller request<br>/wcf/&lt;route-name&gt;"] --> TABLE
    TABLE --> HOST["ServiceHost created<br>for the matched service class"]
    HOST --> DISPATCH["Operation dispatched"]

Configuration-declared services

Service element Class named Endpoints declared Effect
<service name="SAIF.Services.WCF.Services.FileService"/> SAIF.Services.WCF.Services.FileService None Confirms service identity only; supplies no endpoint
<service name="SAIF.Services.WCF.Services.PreferenceService"/> SAIF.Services.WCF.Services.PreferenceService None Confirms service identity only; supplies no endpoint
<service name="SAIF.Services.WCF.Services.WebContextService"/> SAIF.Services.WCF.Services.WebContextService None Confirms service identity only; supplies no endpoint
<service name="SAIF.Services.WCF.Services.ImagingService"/> SAIF.Services.WCF.Services.ImagingService None Confirms service identity only; supplies no endpoint
<service name="SAIF.Services.WCF.Services.FaxService"/> SAIF.Services.WCF.Services.FaxService None Confirms service identity only; supplies no endpoint
<service name="SAIF.Services.WCF.Services.Security.SecurityService"/> SAIF.Services.WCF.Services.Security.SecurityService None Confirms service identity only; supplies no endpoint

Host inventory

This repository contains more than one deployable WCF host project. Each one has its own document set; this table places this host among them.

Host project Services registered Platform Document set
SAIF.Services.WCF.Host FileService, PreferenceService, WebContextService, ImagingService, FaxService, SecurityService x64 This set
SAIF.Services.WCF32.Host ImagingService (a different class/contract) x86 Not documented — SOAP-typed (ServiceRoute activation) but no pipeline reference and no .nuspec reference; see docgen-manifest.md
SAIF.Services.WCF.PDF.Host PdfService x64 Not documented — SOAP-typed (ServiceRoute activation) but no pipeline reference and no .nuspec reference; see docgen-manifest.md
SAIF.Services.WCF.UC4.Host UC4Service x64 SAIF.Services.WCF.UC4.Host

Services hosted in more than one host

Service class Also registered by Implementation shared Primary document set
ImagingService SAIF.Services.WCF32.Host Separate copy — src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs implements SAIF.Services.WCF.Contracts.IImagingService (QueueImage/ReserveImageId, Oracle-backed) while src/WCF/SAIF.Services.WCF32.Host/ImagingService.cs implements the distinct SAIF.Services.WCF.Imaging.WCF32.IImagingService (GetImageFilePath/GetImageRelativePath/GetImageFileType); they are different classes with different operation surfaces, distinguished by platform target (this host x64, WCF32 x86) This set (contracts/imaging-service.md); SAIF.Services.WCF32.Host is not documented — no pipeline reference, no .nuspec reference

The route name Imaging is registered by both hosts, but the two are not two deployments of one class — see Tech debt for the duplication finding.

Deployment variants

Variant Build configuration Artifact Config transform Audience Notes
Internal Release (BuildConfigurationInternal) app-internal (ArtifactNameInternal) Web.Base.config + Web.Release.config Internal callers IIS auth via IISWindowsAuthInternal/IISAnonymousAuthInternal (values defined outside this repository)
External ReleaseExternal (BuildConfigurationExternal) app-external (ArtifactNameExternal) Web.Base.config + Web.ReleaseExternal.config External callers IIS auth via IISWindowsAuthExternal/IISAnonymousAuthExternal; LangVersion 7.3 set only for this configuration

Both variants are produced by the same pipelines/build.yml job over the same src/wcf/SAIF.Services.WCF.Hosts.sln — once with IsPrimary: true for the internal artifact and once with IsPrimary: false for the external artifact. pipelines/release.yml then deploys both artifacts with independent DeployInternal/DeployExternal switches.

Variant differences

Setting or behavior Internal External Source
system.webServer/modules Replaced with an empty element <remove name="clsSecurityModule" /> and <remove name="ContextLogger" /> added Web.Release.config, Web.ReleaseExternal.config
system.web/httpModules Left empty Same two modules removed Same two files
LangVersion Project default 7.3 WCF.csproj
appSettings Identical to the base file Identical to the base file Web.Base.config and both transforms
Services exposed All six All six src/WCF/SAIF.Services.WCF.Host/Global.asax.cs (route table is not transformed)

The externally-facing build explicitly removes the clsSecurityModule and ContextLogger HTTP modules that the internal deployment environment would otherwise inject; that is the one functional difference between the two variants beyond IIS authentication settings.

IIS configuration

Aspect Finding
Site / virtual directory Development root http://localhost/wcf (<IISUrl> in WCF.csproj); deployed host names come from the release pipeline's external EnvironmentSettings\settings.yml, which is not readable from this repository **
Application pool Identity $(wcf.svc.username)/$(wcf.svc.password) from the Architecture.ServiceAccounts.IIS variable group; .NET version $(IISAppPoolDotNetVersion), both resolved by the release pipeline and not confirmable from this repository **
multipleSiteBindingsEnabled true
httpErrors mode Detailed
Custom modules or handlers clsSecurityModule, ContextLogger (removed only in the External variant)

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • src/WCF/SAIF.Services.WCF.Host/Global.asax.cs
  • src/WCF/SAIF.Services.WCF.Host/WCF.csproj
  • src/WCF/SAIF.Services.WCF.Host/Web.Base.config
  • src/WCF/SAIF.Services.WCF.Host/Web.Release.config
  • src/WCF/SAIF.Services.WCF.Host/Web.ReleaseExternal.config
  • pipelines/build.yml
  • pipelines/build-vars.yml
  • pipelines/release.yml