PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are modifying a Windows Communication Foundation (WCF) service that issues security tokens.
The service is accessible through the named pipe protocol. No endpoints are added in the service code.
The configuration file for the service is as follows. (Line numbers are included for reference only)

01 <configuration>
02 <system.serviceModel>
03 <services>
04 <service name=”Contoso.TokenService”>
05 …
06 <host>
07 <baseAddress>
08 …
09 <add baseAddress=”net.pipe://www.contoso.com/tokenpipe” />
10 <baseAddress>
11 </host>
12 </service>
13 </services>
14 </system.serviceModel>
15 </configuration>

You need to ensure that the existing client applications can access the service through HTTP and named pipes.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Insert the following at line 05:
<endPoint address=”http://www.contoso.com” binding=”wsHttpBinding” contract=”Contoso.TokenService” />

B.
Insert the following at line 05:
<endPoint address=”http://www.contoso.com” binding=”basicHttpBinding” contract=”Contoso.TokenService” />

C.
Insert the followin at line 08:
<add baseAddress=”http://www.contoso.com” />

D.
Insert the followin at line 08:
<add baseAddress=”http://www.contoso.com:8080″ />

Explanation:
You can also have multiple base addresses for a service, but each service is allowed only one base address for each transport.
If you have multiple endpoints, each of which is configured with a different binding, their addresses must be unique.
Endpoints that use the same binding but different contracts can use the same address.

Specifying an Endpoint Address
(http://msdn.microsoft.com/en-us/library/ms733749.aspx)

EXAMPLE:

if you have two base addresses, say:

http://localhost:9000/service
net.tcp://localhost:9001/service

and three endpoints

endpoint 1: address=”LOB” binding=”basicHttpBinding”, contract = …
endpoint 2: address=”LOB” binding=”netTcpBinding”, contract = …
endpoint 3: address=”management” binding=”wsHttpBinding”, contract = …

then they will be exposed at the following addresses irrespective of what order you declare them

endpoint 1: http://localhost:9000/service/LOB
endpoint 2: net.tcp://localhost:9001/service/LOB
endpoint 3: http://localhost:9000/service/management

One Comment on “What should you do?


Leave a Reply