You need to tweak the code in order to make it work

Contract exhibit:
[ServiceContract(CallbackContract typeof(INameService))]
public interface IGreetingSennce
{
[OperationContract]
string GetMessage0,
}
[ServiceContract]
public interface INameService
{
[OperationContract]
string GetName();

}
IGreetingService interface exhibit:
<ServiceContract(CallbackContract typeof(INameService))>
Public Interface IGreetingService
<OperationContract>
Function GetMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function GetNamne() As String
End Interface
Hosting code exhibit:
Dim host As ServiceHost =
New ServiceHost(GetType(GreetingService))
Dim binding As NetTcpBinding =
New NetTc pBindng(SecurityMode.None)
Host.AddServiceEndpoint(“PassGuideAppIGreetingService”,
binding, net.tcp:localhost = “96374″)
Host Open()
INameService interface exhibit:
class NameService INameService
{
string name;

public NameService(string name)
{
this.name = name;
}
public string GetName()
{
return name;
}}
Class NameService
Implements INameService
Dim name As String
Public Sub NameService(ByV name As String)
Me.reme = name
End Sub
Public Function GetName() As String -Impements INameService. GeNamee
Return name
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is self-hosted.
The implementations of contracts, the IGreetingService interface, the hosting code, and the
INameService interface are all being displayed in the exhibits.
At the moment the above code fails at line “return String.Format(“Hi there {0}, clientName);”.
You need to tweak the code in order to make it work.
What should you do? (select three)

Use code…

Contract exhibit:
[ServiceContract(CallbackContract typeof(INameService))]
public interface IGreetingSennce
{
[OperationContract]
string GetMessage0,
}
[ServiceContract]
public interface INameService
{
[OperationContract]
string GetName();

}
IGreetingService interface exhibit:
<ServiceContract(CallbackContract typeof(INameService))>
Public Interface IGreetingService
<OperationContract>
Function GetMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function GetNamne() As String
End Interface
Hosting code exhibit:
Dim host As ServiceHost =
New ServiceHost(GetType(GreetingService))
Dim binding As NetTcpBinding =
New NetTc pBindng(SecurityMode.None)
Host.AddServiceEndpoint(“PassGuideAppIGreetingService”,
binding, net.tcp:localhost = “96374″)
Host Open()
INameService interface exhibit:
class NameService INameService
{
string name;

public NameService(string name)
{
this.name = name;
}
public string GetName()
{
return name;
}}
Class NameService
Implements INameService
Dim name As String
Public Sub NameService(ByV name As String)
Me.reme = name
End Sub
Public Function GetName() As String -Impements INameService. GeNamee
Return name
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is self-hosted.
The implementations of contracts, the IGreetingService interface, the hosting code, and the
INameService interface are all being displayed in the exhibits.
At the moment the above code fails at line “return String.Format(“Hi there {0}, clientName);”.
You need to tweak the code in order to make it work.
What should you do? (select three)

Use code…

A.
<ServiceContract(CallbackContract = typeof(INameService), SessionMode = SessionMode.
Required)>

B.
<ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Unique)>

C.
<ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)>

D.
..and Insert the following code before the first line in the implementation of..

E.
..and replace the first line in the implementation of..

F.
..the contracts.

G.
.. the IGreetingService interface

H.
.. the hosting code

I.
.. INameService interface

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *