Skip to content

Commit b801803

Browse files
add README.md
1 parent 980d015 commit b801803

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
ASP.NET 4.6.2 MVC & WebApi Example Application
2+
====
3+
4+
### Requirements
5+
6+
- Visual Studio 2022
7+
- .NET Framework 4.6.2+
8+
9+
### Setup
10+
11+
The example project is configured to install Bugsnag dependencies from a local package source. Run the build script from the repository root to build and generate the local packages:
12+
13+
```
14+
.\build.ps1 --Target Pack
15+
```
16+
17+
Or, alternatively, you can use Visual Studio to install the latest version from `nuget.org`
18+
19+
In the `Web.Config` file enter the Bugsnag API key that you want to
20+
use with this application:
21+
22+
```xml
23+
<bugsnag apiKey="APIKEY" releaseStage="development" notifyReleaseStages="development" projectNamespaces="Bugsnag.Sample.AspNet35" projectRoots="C:\app\" />
24+
```
25+
26+
### Run the App
27+
28+
Compile and start the website from Visual Studio.
29+
30+
- Navigate to `/Home/About/` to send a handled exception
31+
- Navigate to `/Home/Crash/` to trigger an unhandled exception in MVC
32+
- Hit the API on `/api/values` to trigger an unhandled exception in Web API
33+
34+
### Steps taken to install Bugsnag
35+
36+
- Add the required nuget packages (see `packages.config`)
37+
- Add the configuration sections to the `web.config`
38+
39+
```xml
40+
<configSections>
41+
<section name="bugsnag" type="Bugsnag.ConfigurationSection.Configuration, Bugsnag.ConfigurationSection" />
42+
</configSections>
43+
```
44+
45+
- In `App_Start\WebApiConfig.cs` add Bugsnag
46+
47+
```csharp
48+
config.UseBugsnag(Bugsnag.ConfigurationSection.Configuration.Settings);
49+
```

0 commit comments

Comments
 (0)