.net - Pause OWIN/WebAPI2 SelfHost service -


is there way programmatically change environment variables of owin/webapi2 host after started , running?

there many samples creating windows service owin self-host app. easy , straightforward: call webapp.start<>(..) in onstart() method, catch idisposable returned , dispose in onstop. ok.

but trying onpause/oncontinue. want change owin environment variable enable\disable custom owin middleware intercept requests , return 503, example, when service paused. problem idisposable returned webapp.start<>(..) not contain public info service started it. , cannot find way access host/context/settings of running owin host accessed middlewares after change'em.

surely 1 can add middleware/contoller react on specific web requests, don't want allow possibility of calling these commands public. local machine's admin rights - accepted way call it.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -