You are developing an application that consumes a Windows Communication Foundation (WCF) service.
The application interacts with the service by usingthe following code. (Line numbers are included forreference
only.)
You need toauthenticate to the WCF service.
What should you do?
A.
At line 11, add the following lines of code.
,username: yourusername
,password: yourpassword
B.
At line 11, add the following line of code.
,credentials: prompt
C.
At line 06, replace the code with the following line of code.
url: “http://contoso.com/Service.svc/GetCountry?
Username=username&password=psssword”,
D.
At line 11, add the following line of code. The username and password will be stored in an XML file.
,credentials: credentials.xml
Explanation:
See Jquery ajax
password
Type: String
A password to be used in response to an HTTP accessauthentication request.
username
Type: String
A username to be used in response to an HTTP accessauthentication request.