Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# HttpClient POST or PUT Json with content type application/json
- Creating dynamic arrays and lists using Dynamic and ExpandoObject in C#
- Using C# HttpClient from Sync and Async code
- Run tasks in parallel using .NET Core, C# and async coding
- C# Get expiry timestamp from JWT token
- c# Async fire and forget
- HttpClient retry mechanism with .NET Core, Polly and IHttpClientFactory
Archive
Meta
Tag Archives: ashx
URL Rewrite and Sitecore
The Microsoft URL Rewrite module is an ISS extension that allows you to rewrite one URL to another using regular expressions. The extension is like the Sitecore aliases on steroids, and is especially useful for mapping old dynamic URL’s to … Continue reading
Posted in .net, c#, General .NET, Sitecore 6, Sitecore 7
Tagged Aliases, ashx, CustomHandler, Sitecore, URL Rewrite
1 Comment
Stream Sitecore media items to HttpResponse
Here is a small tip for you who is doing API’s based on Sitecore. How to get an item from the Sitecore Media Library and stream it to the HttpResponse of a page. This is an example of an .ashx … Continue reading
The .ashx extension – Writing your own HttpHandler
Have you noticed how Sitecore serves images using an .ashx extension? A .ashx file is a HttpHandler. A HttpHandler is kind of a lightweight aspx page, as the HttpHandler only deals with the HttpContext – for example there is no page … Continue reading
Media Library file names. Tired of guids?
Have you noticed that when uploading files to the media library, sometimes the resulting file name is a guid? If I upload an image, say Brian.jpg, I need to write ~/media/9B62BB56FD6040FAA56C6DB1D8A0BDE6.ashx in order to acces it from the front end. And … Continue reading
Sitecore 5.3 and ImageURI
If you assign the path of a media item to a Image.ImageUrl in code behind it will not find the image unless you prefix the path with a /, see the example code below: If you do not make the … Continue reading