0

I have an empty site that I use for online purposes. It is essentially just the app_offline.htm, an image and a web.config. This is running in IIS7.5 with .NET4/Integrated (there's no code, but why not go with the latest?)

When I go to the home page, I get the contents of app_offline, but when I go to http://www.contoso.com/about, I get a 404. That problem is solved, per http://blog.kurtschindler.net/post/app_offlinehtm-gotchas-with-aspnet-mvc, with

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

But then the image, our logo, stops appearing as well. Is there a way to get the app_offline.htm to show up for all friendly URLs, but not for images?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Dan Friedman
  • 4,941
  • 2
  • 41
  • 65

1 Answers1

3

Encode you image as base64:

<img alt="sample" src="data:image/png;base64,ImageToBASE64String"/>

app_offline.htm needs to be at least 512 bytes long.

http://en.wikipedia.org/wiki/Data_URI_scheme

Similar question: App_offline.htm, CSS, images, and aspnet_isapi.dll

Community
  • 1
  • 1
cinek
  • 1,888
  • 2
  • 13
  • 14