How can you remedy this problem?

There is MS Visual Studio 2010 and MS .NET Framework 4 application PassGuideApp.
There is WCF Data Service service.
PassGuideApp uses this service to connect to a MS SQL Server 2008 database
PassGuideDB.
This service is hosted on a IIS 6.0 server.
However, when PassGuideApp issues DELETE and PUT request to the service an error
message is produced.
How can you remedy this problem? Select two.

There is MS Visual Studio 2010 and MS .NET Framework 4 application PassGuideApp.
There is WCF Data Service service.
PassGuideApp uses this service to connect to a MS SQL Server 2008 database
PassGuideDB.
This service is hosted on a IIS 6.0 server.
However, when PassGuideApp issues DELETE and PUT request to the service an error
message is produced.
How can you remedy this problem? Select two.

A.
PassGuideApp should use the X-HTTP-Method header…

B.
PassGuideApp should use the HTTP ContentType header…

C.
PassGuideApp should use the HTTP Service header…

D.
..as part of the DELETE request.

E.
..as part of the POST request.

F.
..as part of the GET request.

G.
..as part of the PUT request.

Explanation:



Leave a Reply 2

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


John Galt

John Galt

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

It is possible to instruct network intermediaries (proxies, firewalls, and so on) inspecting traffic at the application protocol layer (for example, HTTP) to block requests that contain certain HTTP verbs. In practice, GET and POST verbs are rarely blocked (traditional web pages rely heavily on these HTTP methods), while, for a variety of reasons (such as security vulnerabilities in prior protocols), other HTTP methods (PUT, DELETE, and so on) are at times blocked by intermediaries. Additionally, some existing HTTP libraries do not allow creation of requests using verbs other than GET or POST. Therefore, an alternative way of specifying request types which use verbs other than GET and POST is needed to ensure that this document works well in a wide range of environments.

To address this need, the X-HTTP-Method header can be added to a POST request that signals that the server MUST process the request not as a POST, but as if the HTTP verb specified as the value of the header was used as the method on the HTTP request’s request line. This technique is often referred to as “verb tunneling”.

John Galt

John Galt

For example, the HTTP request in the following Delete Request Tunneled in a POST Request listing instructs the server to delete the EntityType instance identified by EntityKey value 5 in the Categories EntitySet instead of performing an insert operation.

POST /Categories(5)
HTTP/1.1
Host: server
X-HTTP-Method: DELETE