문제

I'm trying to drop in ImageResizer to replace an existing system on an ASP.NET MVC site. Currently the site supports two similar URLs:

"/images/[GUID]"

and

"/images/$[GUID]"

These point to two different data sources. Currently one of these looks for the image data in an otherwise inaccessible folder while the other looks in a SQL database. Is there a way to dynamically change the source for the image data in the pipeline (to different folder or to the SQL provider)? By adding an event to the current pipeline's PostAuthorizeRequestStart I've been able to change some of the behavior, but I'm not sure how to alter the actual data source. Thanks

도움이 되었습니까?

해결책

So I solved this using the Rewrite event handler and rewriting the prefix to match my source. Not sure if this is the best way, but it is working.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top