Developer forum

Forum » Development » ashx handler handler

ashx handler handler

Claus Ørum-Petersen
Reply

Hey DW,

I'm trying to implement a custom ashx handler, but it seems that nomatter how i register it with the IIS webserver dynamic web has some rewrites that takes precedence ? can you confirm if this is an issue or am I able to bypass this with a configuration ??

Regards Claus


Replies

 
Nicolai Pedersen
Reply

Hi Claus

.ashx handlers should be straight forward - at least if you have a .ashx file. If you have a httphandler only, it might require a bit of changes to global.asax - see the below thread.

https://doc.dynamicweb.com/forum/dynamicweb-9-0-upgrade-issues/dynamicweb-9-0-upgrade-issues/using-webapi-with-attribute-routing-in-dw-9

If that does not get you in the right direction, please tell a bit about your implementation - then I am sure we can figure it out.

BR Nicolai

 
Claus Ørum-Petersen
Reply

Hi Nicolai,

Thanks for the reply, I gave up on the handler and found another solution smiley

It would be nice if there where some settings in dw which allowed devs to overrule web server specifics like routing. Without having to use dw events like notifications wink

 
Nicolai Pedersen
Reply

Hi Claus

Glad you got it working!

Yes - that would be nice. The issue is that we need to route all urls to the Dynamicweb routehandler to map it to potential URLs created in the CMS. If a file exists on the path, the handler will not take affect, but if you have your own 'virtual' routes, currently you need to bypass the Dynamicweb routehandler by code. That might be possible to do as a setting in Dynamicweb or by looking at other routing settings.

I'll create a task for us to look into improving this.

BR Nicolai

 

You must be logged in to post in the forum