Static Files Return 302 Outside Edit Mode

  • Updated

You may run into issues upon deployment of an Episerver site where static files (.js, .css, etc.) aren’t loading in View mode, but will render when you are logged into Edit mode.

Since static files will load within Edit mode context, then the logical assumption is that anonymous users do not have the proper permissions.

The cause of this is likely due to permissions issues for anonymous users, in particular with Anonymous Authentication. 

Ensure that Anonymous Authentication in IIS is using the service account that runs the application pool (for example, Network Service).

If for some reason this solution doesn’t work, other suggestions are found in this Stack Overflow link: