I ham having problems serving a .appcache file from Azure.
When viewd in Chrome developer tools console, I get the following message
Application Cache Error event: Manifest fetch failed (404) http://mydomain.cloudapp.net/c.appcahe
Now I know the default vm of an Azure instance will not recognise the .appcache extension and mime type, so I added the following to my webrole web.config
<system.webServer>
<staticContent>
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest"/>
</staticContent>
</system.webServer>
yet I still get a 404 error when I try and browse c.appcache, and the corresponding 404 in the console.
If I run the the app in dev fabric, the resources within c.appcache get downloaded fine and the temp website created in IIS has the corresponding Mime types added in the iis config.
Can anyone help me with this issue.
Thanks
Brett
Thought I would provide an answer for this question in case others were having the same problem.
The problem is in 2 parts. 1. First part was the mime type, which my code above correctly fixed. 2. The second half of the problem was down to the packaging my deployment from VS2010 omitting the c.appcache file when it packaged everything up. So even though IIS now recognised the mime type, it still gives a 404 as the file isn't there. This can be fixed by R-clicking on the c.appcache in VS and making the build action on the file "content".
Hope this helps.