Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Images in app_offline file

Tags:

asp.net

Is there a way to use an image with an app_offline file? I'd like to keep the app_offline looking like the rest of the website - same header, etc, which includes an image.

I did try finding a way to do this but I can't seem to do so. The forum posts that I've ran across say it's not possible, since the app_offline forces all requests (even those for images and css) to redirect to the app_offline page, but I'm hoping that someone here will have an answer. Obviously, I can embed the css into the HTML, rather than pointing to the site's .css file, but I'm not sure how to get around the image issue.

like image 866
David Avatar asked Jun 01 '11 13:06

David


1 Answers

You could try base64 encoding the image, ie.

<img src="data:image/gif;base64,BASE64STRINGHERE" width="80" height="15" /> 

The reason you need to do it like this is that IIS sees the image as a request and app_offline.htm being present in the root is telling IIS to redirect ALL requests therefore this includes any MIME types from images to music etc

like image 174
Apqu Avatar answered Sep 29 '22 16:09

Apqu