SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
714 stars 108 forks source link

Saturn doesn't start when diagnostics are enabled and filesystem is not writeable #166

Closed SabotageAndi closed 4 years ago

SabotageAndi commented 5 years ago

As diagnostics are enabled by default and if your filesystem isn't writeable (happened for me on Azure Appservices), the server didn't start, because it could not write to the Site.map file.

The File.WriteAllText at https://github.com/SaturnFramework/Saturn/blob/master/src/Saturn/Diagnostics.fs#L69 throws this exception.

Disabling diagnostics for release build with

#if !DEBUG
    disable_diagnostics
#endif 

helped to start it on my deployment target.

Happens with Saturn 0.8.

Krzysztof-Cieslak commented 4 years ago

Fixed in https://github.com/SaturnFramework/Saturn/commit/bd623af3ceedb5da1d59be4d56009b3aaadad402