6
<%@ ServiceHost Language="C#" Debug="true" Service="FirstWcfService.Service1"%>

Im hosting my service at WAS using SVC file:

enter image description here

But as you can see it doesnt have CodeBehind Attrbiute as it should. and its working.

How is that ?

http://msdn.microsoft.com/en-us/library/aa967286.aspx

G Gr
  • 6,030
  • 20
  • 91
  • 184
Royi Namir
  • 144,742
  • 138
  • 468
  • 792

1 Answers1

7

The service class is compiled into one of the referenced assemblies. The service used is FirstWcfService.Service1 as defined in the svc file:

Service="FirstWcfService.Service1"

CodeBehind only matters to the tooling (Visual Studio). It doesn't matter at runtime, where the system will only look at what types are declared and used.

driis
  • 161,458
  • 45
  • 265
  • 341