November Happy Hour will be moved to Thursday December 5th.

How to load MediaData from URL

Vote:
 

How can I load up a MediaData object for a given URL?

I'm trying to do this the Application_BeginRequest event currently, but can't find a way of loading the MediaData instance for the requested URL.

#115305
Jan 13, 2015 15:26
Vote:
 

Not sure (haven't tested myself) but I think that UrlResolver is capable of doing that.

var resolver = ServiceLocator.Current.Get<UrlResolver>();
IContent content = resolver.Route(new UrlBuilder("...."));
#115355
Jan 13, 2015 21:55
Vote:
 

Thanks Valdis, that was indeed the way to do it!

#115666
Jan 15, 2015 17:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.