Using Webrequest - Processrequest - this.GetPostbackUrl() from Wisej Extension?

0
0

Hi
AFAIK… Wisej allow to serve content (to be able browser cached) (and save server memory in some escenarios like serving many images for example carousel or slider, avoiding memorystreams or memory server objects related to wisej sessions)
1 – In widget using
this.GetPostbackUrl() + “&img-name=test”, in startup.js for example,
and private void widget1_WebRequest(object sender, WebRequestEventArgs e)
2 – In class
public class MyPictureBox : PictureBox, IWisejHandler
and void IWisejHandler.ProcessRequest(HttpContext context)

Questions:
1 – What about from Wisej Extension?
2 – It is posible to define webrequest or processrequest (maybe defined in extension) and override (in object instance)? (for generic way to serve some content from extension)

Could you share short example?

Thanks in advance!

  • You must to post comments
0
0

I choose ashx handler because every time that resign in website the url of this.postbackurl() changes
the querystrings (sid and x) changes.
This behaviour observed too for example if open a form with a widget and open a new same form and values of querystring changes(sid and x) and then aren’t cached. browser thinks that are new content and was the same images in previous request – response.

With handler no issues, content is cached a bit different because url only has a 1 querystring value (my custom)

  • Luca (ITG)
    You can’t use PostbackUrl() as a URL handler like an ashx page. It’s designed to allow a component to respond to a request, it’s not a routing system and it must be secure, otherwise you’d have a backdoor to your app. For simple routing you can use ashx, nancy, IHttpHandler, etc.
  • You must to post comments
0
0

You can implement IWisejHandler on any Wisej component but you need to derive a class and add the interface. Otherwise you can use Wisej.Web.Widget, it fires the WebRequest event.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.