1
1
-------------------------------------
2
- Exceptionless Readme
2
+ Exceptionless Readme
3
3
-------------------------------------
4
- Exceptionless provides real-time error reporting for your apps. It organizes the
5
- gathered information into simple actionable data that will help your app become
4
+ Exceptionless provides real-time error reporting for your apps. It organizes the
5
+ gathered information into simple actionable data that will help your app become
6
6
exceptionless!
7
7
8
8
Learn more at http://exceptionless.io.
9
9
10
10
-------------------------------------
11
- How to get an api key
11
+ How to get an api key
12
12
-------------------------------------
13
- The Exceptionless client requires an api key to use the Exceptionless service.
14
- You can get your Exceptionless api key by logging into http://exceptionless.io
13
+ The Exceptionless client requires an api key to use the Exceptionless service.
14
+ You can get your Exceptionless api key by logging into http://exceptionless.io
15
15
and viewing your project configuration page.
16
16
17
17
-------------------------------------
18
- ASP.NET Web Api Integration
18
+ ASP.NET Web Api Integration
19
19
-------------------------------------
20
- The Exceptionless.WebApi package will automatically configure your web.config.
21
- All you need to do is open the web.config and add your Exceptionless api key to
20
+ The Exceptionless.WebApi package will automatically configure your web.config.
21
+ All you need to do is open the web.config and add your Exceptionless api key to
22
22
the web.config Exceptionless section.
23
23
24
24
<exceptionless apiKey="API_KEY_HERE" />
25
25
26
26
Next, you must import the "Exceptionless" namespace and call the following line
27
- of code to start reporting unhandled exceptions. You will need to run code during
27
+ of code to start reporting unhandled exceptions. You will need to run code during
28
28
application startup and pass it an HttpConfiguration instance. Please note that this
29
29
code is normally placed inside of the WebApiConfig classes Register method.
30
30
@@ -40,13 +40,20 @@ for examples on sending events to Exceptionless.
40
40
-------------------------------------
41
41
Manually reporting an exception
42
42
-------------------------------------
43
- By default the Exceptionless Client will report all unhandled exceptions. You can
44
- also manually send an exception by importing the Exceptionless namespace and calling
43
+ By default the Exceptionless Client will report all unhandled exceptions. You can
44
+ also manually send an exception by importing the Exceptionless namespace and calling
45
45
the following method.
46
46
47
47
exception.ToExceptionless().Submit()
48
48
49
+ Please note that Web Api doesn't have a static http context. If possible, it is recommended
50
+ that you set the HttpActionContext when submitting events. Doing so will allow the request and
51
+ user information to be populated. You can do this by calling the SetHttpActionContext EventBuilder
52
+ extension method.
53
+
54
+ exception.ToExceptionless().SetHttpActionContext(ActionContext).Submit()
55
+
49
56
-------------------------------------
50
- Documentation and Support
57
+ Documentation and Support
51
58
-------------------------------------
52
- Please visit http://exceptionless.io for documentation and support.
59
+ Please visit http://exceptionless.io for documentation and support.
0 commit comments