-
-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
#HttpModule Configuration
BugGuardian.WebForms provides two different HttpModules to automatically intercept unhandled exception:
- BugGuardianBugModule: it reports the unhandled exception as Bug to VSTS/TFS
- BugGuardianTaskModule: it reports the unhandled exception as Task to VSTS/TFS
All you have to do to use a module is to add the following line to your web.config file within the modules subsection of the system.webServer section:
<add type="DBTek.BugGuardian.WebForms.Modules.BugGuardianBugModule, DBTek.BugGuardian.WebForms" name="BugGuardianBugModule" />
Of course, if you want the unhandled exception to be reported like a Task work item instead of a Bug work item, just register the second HttpModule:
<add type="DBTek.BugGuardian.WebForms.Modules.BugGuardianTaskModule, DBTek.BugGuardian.WebForms" name="BugGuardianTaskModule" />
The final modules subsection of the system.webServer section of your web.config file will probably look like this:
<system.webServer>
[...]
<modules>
[...]
<add type="DBTek.BugGuardian.WebForms.Modules.BugGuardianBugModule, DBTek.BugGuardian.WebForms" name="BugGuardianBugModule" />
<!--<add type="DBTek.BugGuardian.WebForms.Modules.BugGuardianTaskModule, DBTek.BugGuardian.WebForms" name="BugGuardianTaskModule" />-->
[...]
</modules>
[...]
</system.webServer>To assign the settings using the configuration file, just edit the Web.config.
Add this line in the configSections section:
<configSections>
[...]
<section name="BugGuardianConfiguration" type="DBTek.BugGuardian.Config.BugGuardianConfiguration, DBTek.BugGuardian.Standard" restartOnExternalChanges="false" requirePermission="false" />
[...]
</configSections>Then, add this block anywhere in the config file:
<BugGuardianConfiguration>
<BugGuardianSettings>
<add key="Url" value="https://XXXXX.visualstudio.com" />
<add key="Username" value="USER_NAME" />
<add key="Password" value="PASSWORD" />
<!-- Optional: team collection name -->
<add key="CollectionName" value="DefaultCollection" />
<add key="ProjectName" value="PROJECT_NAME" />
<!-- Optional -->
<add key="AvoidMultipleReport" value="true" />
</BugGuardianSettings>
</BugGuardianConfiguration>