14

I loved the features of using app_offline.htm on my ASP.NET WebForm based sites.
Upload the file and your app is immediately "offline". Snappy.

Now that I'm using MVC 2, I noticed that this no longer works.
Is there a way to get this behavior in ASP.NET MVC 2 like it did in WebForms?
If not, what alternative do you prefer?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
CitizenBane
  • 855
  • 7
  • 17

1 Answers1

22

app_offline.htm works on MVC sites. You need to make sure it's 512 bytes or larger. I use it all the time when updating a couple of MVC sites.

37Stars
  • 2,489
  • 20
  • 23
  • 2
    Ok, I feel stupid, because suddenly it's working for me! I did, however, notice that none of my content gets rendered (Images, etc...) They all reside in either my /Content folder or /Scripts folder. – CitizenBane Apr 22 '10 at 22:58
  • LOL, welcome to the club. Been there, done that, sure to do it again. – 37Stars Apr 23 '10 at 15:11
  • 4
    In order to get images to render in the App_Offline.htm page, you need to [embed the image within the html](http://webcodertools.com/imagetobase64converter). – Clay Nov 19 '12 at 22:58