none
How to implement HttpRequestWrapper in Asp.net? RRS feed

  • Question

  • Hi All,

    I want to implement HttpRequestWrapper in asp.net application for following scenario.

    I have a page called mypage.aspx and it's contains few form elements and posting (redirecting) this page to Microsoft page. After some validation from Microsoft page again redirecting /posting to back to mypage.aspx. While receiving new request, the old form elements and querystring will get lost, so I want to override/wrap new request with old form elements and querystring (like, in java HttpRequestWraaper)

    (Assume that Microsoft site doesn't handle any 3rd party HtptRequest form elements and querystring)

    Before posting the request from mypage.aspx to Microsoft page, I am capturing form elements and Querysting data into session. And user can use this session through-out that application. So user has to do manually append/insert form elements into new form. This is looks little bit wired implementation, instead of this I want to wrap old form elements to new request by using HttpRequestWrapper.

    There are few articles says we can wrap new request by using following namespace

    System.web.HttpRequestWrapper (in System.Web.Abstractions.dll)
    System.web.HttpRequestBase (in System.Web.Abstractions.dll)

    Here, I would like to know

    How to wrap/override HttpRequest and its members
    How to pass the new wrapped HttpRequest to HttpRuntime


    -damodaran r
    • Moved by nobugz Tuesday, October 21, 2008 11:15 AM not bcl (Moved from .NET Base Class Library to Off-Topic Posts (Do Not Post Here))
    Tuesday, October 21, 2008 5:23 AM

All replies