You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using Webrequest - Processrequest - this.GetPostbackUrl() from Wisej Extension? #1526
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)
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.
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)
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.
Activity
itg-assistant commentedon Jun 13, 2026
Luca answered 2018-05-03 16:21:28 UTC
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.
itg-assistant commentedon Jun 13, 2026
Ser Gar answered 2018-05-03 22:07:43 UTC
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)
itg-assistant commentedon Jun 13, 2026
Luca answered 2018-05-03 22:10:46 UTC
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.