2.0 Upgrade Issue (Unable to access WebAPI client outside of request lifecycle)
tynorton opened this issue · 2 comments
tynorton commented
Related to #93 ...
We used to configure all our clients programtically in Global.asax.cs
, but ran into issue with the 2.0 upgrade.
We used to be able to set config values, and delegates on the global client instance like so:
WebMVCClient.Config.XXX = xxx;
WebAPIClient.Config.XXX = xxx;
Now we have:
// NOTE: All config values are read-only now
Bugsnag.AspNet.Client.Current.XXX = xxx;
// Request is null ...
Request.Bugsnag().XXX = xxx;
Was not mentioned in the update docs.
martin308 commented
tynorton commented
Not a duplicate. Related.
The way you have Request.Bugsnag()
implemented, there is no way to configure it from a global scope, even if the properties weren't read-only.