I accept my service in WAS ...">

Does the Svc file work without code?

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

I accept my service in WAS using an SVC file:

enter image description here

But, as you can see, it does not have a CodeBehind Attrbiute, as it should be. and his work.

Like this?

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

+6
source share
1 answer

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

 Service="FirstWcfService.Service1" 

CodeBehind is only relevant for toolkits (Visual Studio). It does not matter at runtime when the system will only see what types are declared and used.

+7
source

Source: https://habr.com/ru/post/899402/


All Articles