Request redirection handler
I have win forms client application that should communicate with third party web services. Web services requires specific authentication and I should keep it secured from win forms client. To do it, i created HttpHandler (IHttpHandler), that adds authentication header.
Please find following workflow:
Win forms application prepare web request for third party 开发者_开发百科service and send it to my HttpHandler.
HttpHandler add authentification header
HttpHandler forward request to third party web service.(?)
Response directly returned to win forms application (this necessary, because the third party service can provide very big responses and these data shouldn't transfered through my HttpHandler).
How I can forward request to third party web service?
RewritePath - works only in boundaries of one application and it can't forward request to another domain.
Response.Redirect is not solution, because it only notifies win forms application to send request to new location and doesn't keep authentication header.
Could you create your own HTTPWebRequest
and call the 3rd party webservices direct, consume the result, adapt to suit your needs and return that to your winforms client?nd
精彩评论