locked
Modify Request Headers with HTTP module? RRS feed

  • Question

  • User-680512290 posted
    Hi

    I need to authenticate a flash client. Flash is limited in what I can programmatically set in terms of HTTP headers etc.

    I planned to pass in the ASP.NET session id into the flash control. The flash control would then make a request to a .NET webservice. I need to pass the sessionid from the flash client to the server. I then need to check that the session is valid on the server.

    My idea was to create an HTTP module which would look for the sessionid (passed as part of the SOAP request, or otherwise). It would then ADD an HTTP header to the request "ASP_sessionid" or whatever, with the sessionid in place. Subsequently the SessionStateModule woule read this value and honour the request in the usual way.

    My efforts fell short upon discovery that the Request.Headers collection is read-only. Is there a way to modify the request in an HTTP module, or am I attempting the impossible!?

    Another option may be to create a completely new request, based on the original and discard the original request. Is this possible?

    Thanks in advance


    Friday, May 12, 2006 10:25 AM

All replies

  • User-2001980297 posted
    Concerning a custom header problem, perhaps, this post can help you.
    Sunday, May 14, 2006 10:03 PM
  • User-680512290 posted
    Thanks very much. I now have an HTTP module which moves a session id in the QueryString to the Request Headers.

    Cheers
    Tuesday, May 16, 2006 6:58 AM
  • User-1639143169 posted
    Are you willing to share that code? ;-)
    Tuesday, May 30, 2006 2:21 PM