开发者

Request redirection handler

开发者 https://www.devze.com 2023-02-19 09:31 出处:网络
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

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:

  1. Win forms application prepare web request for third party 开发者_开发百科service and send it to my HttpHandler.

  2. HttpHandler add authentification header

  3. HttpHandler forward request to third party web service.(?)

  4. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消