8 | }
9 | else
10 | {
11 | @Body
12 | }
13 |
14 | @code {
15 | [CascadingParameter]
16 | private HttpContext? HttpContext { get; set; }
17 |
18 | protected override void OnParametersSet()
19 | {
20 | if (HttpContext is null)
21 | {
22 | // If this code runs, we're currently rendering in interactive mode, so there is no HttpContext.
23 | // The identity pages need to set cookies, so they require an HttpContext. To achieve this we
24 | // must transition back from interactive mode to a server-rendered page.
25 | NavigationManager.Refresh(forceReload: true);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Migrations/20240418201243_EventStackTrace.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore.Migrations;
2 |
3 | #nullable disable
4 |
5 | namespace AppStatServer.Migrations
6 | {
7 | ///
8 | public partial class EventStackTrace : Migration
9 | {
10 | ///
11 | protected override void Up(MigrationBuilder migrationBuilder)
12 | {
13 | migrationBuilder.AddColumn(
14 | name: "StackTrace",
15 | table: "Events",
16 | type: "longtext",
17 | nullable: true)
18 | .Annotation("MySql:CharSet", "utf8mb4");
19 | }
20 |
21 | ///
22 | protected override void Down(MigrationBuilder migrationBuilder)
23 | {
24 | migrationBuilder.DropColumn(
25 | name: "StackTrace",
26 | table: "Events");
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Shared/StatusMessage.razor:
--------------------------------------------------------------------------------
1 | @if (!string.IsNullOrEmpty(DisplayMessage))
2 | {
3 | var statusMessageClass = DisplayMessage.StartsWith("Error") ? "danger" : "success";
4 |
5 | @DisplayMessage
6 |
7 | }
8 |
9 | @code {
10 | private string? messageFromCookie;
11 |
12 | [Parameter]
13 | public string? Message { get; set; }
14 |
15 | [CascadingParameter]
16 | private HttpContext HttpContext { get; set; } = default!;
17 |
18 | private string? DisplayMessage => Message ?? messageFromCookie;
19 |
20 | protected override void OnInitialized()
21 | {
22 | messageFromCookie = HttpContext.Request.Cookies[IdentityRedirectManager.StatusCookieName];
23 |
24 | if (messageFromCookie is not null)
25 | {
26 | HttpContext.Response.Cookies.Delete(IdentityRedirectManager.StatusCookieName);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServerLite/LiteDbEventStorage.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Immutable;
2 | using AppStatServerLite.Data;
3 | using LiteDB;
4 |
5 | namespace AppStatServerLite;
6 |
7 | public class LiteDbEventStorage : IEventStorage, IDisposable
8 | {
9 | private readonly string? _dbFileName;
10 | private readonly LiteDatabase _db;
11 |
12 | public LiteDbEventStorage(string? dbFileName = "AppStat.db")
13 | {
14 | _dbFileName = dbFileName;
15 | _db = new LiteDatabase(_dbFileName);
16 | }
17 |
18 | public Task SaveEventsAsync(IEnumerable appEvents)
19 | {
20 | var col = _db.GetCollection("events");
21 | col.Insert(appEvents);
22 | return Task.CompletedTask;
23 | }
24 |
25 | public Task> GetRecentEventsAsync()
26 | {
27 | var col = _db.GetCollection("events");
28 | var result = col.Find(x => true, 0, 100);
29 | return Task.FromResult(result.ToImmutableList());
30 | }
31 |
32 | public void Dispose() => _db.Dispose();
33 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Igor Gritsenko
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Pages/Manage/PersonalData.razor:
--------------------------------------------------------------------------------
1 | @page "/Account/Manage/PersonalData"
2 |
3 | @inject IdentityUserAccessor UserAccessor
4 |
5 | Personal Data
6 |
7 |
8 |
Personal Data
9 |
10 |
11 |
12 |
Your account contains personal data that you have given us. This page allows you to download or delete that data.
13 |
14 | Deleting this data will permanently remove your account, and this cannot be recovered.
15 |
18 | Swapping to Development environment will display more detailed information about the error that occurred.
19 |
20 |
21 | The Development environment shouldn't be enabled for deployed applications.
22 | It can result in displaying sensitive information from exceptions to end users.
23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
24 | and restarting the app.
25 |
18 |
19 | If you reset your authenticator key your authenticator app will not work until you reconfigure it.
20 |
21 |
22 | This process disables 2FA until you verify your authenticator app.
23 | If you do not complete your authenticator app configuration you may lose access to your account.
24 |
25 |
26 |
27 |
31 |
32 |
33 | @code {
34 | [CascadingParameter]
35 | private HttpContext HttpContext { get; set; } = default!;
36 |
37 | private async Task OnSubmitAsync()
38 | {
39 | var user = await UserAccessor.GetRequiredUserAsync(HttpContext);
40 | await UserManager.SetTwoFactorEnabledAsync(user, false);
41 | await UserManager.ResetAuthenticatorKeyAsync(user);
42 | var userId = await UserManager.GetUserIdAsync(user);
43 | Logger.LogInformation("User with ID '{UserId}' has reset their authentication app key.", userId);
44 |
45 | await SignInManager.RefreshSignInAsync(user);
46 |
47 | RedirectManager.RedirectToWithStatus(
48 | "Account/Manage/EnableAuthenticator",
49 | "Your authenticator app key has been reset, you will need to configure your authenticator app using the new key.",
50 | HttpContext);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer.Client/PersistentAuthenticationStateProvider.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components;
2 | using Microsoft.AspNetCore.Components.Authorization;
3 | using System.Security.Claims;
4 |
5 | namespace AppStatServer.Client
6 | {
7 | // This is a client-side AuthenticationStateProvider that determines the user's authentication state by
8 | // looking for data persisted in the page when it was rendered on the server. This authentication state will
9 | // be fixed for the lifetime of the WebAssembly application. So, if the user needs to log in or out, a full
10 | // page reload is required.
11 | //
12 | // This only provides a user name and email for display purposes. It does not actually include any tokens
13 | // that authenticate to the server when making subsequent requests. That works separately using a
14 | // cookie that will be included on HttpClient requests to the server.
15 | internal class PersistentAuthenticationStateProvider : AuthenticationStateProvider
16 | {
17 | private static readonly Task defaultUnauthenticatedTask =
18 | Task.FromResult(new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity())));
19 |
20 | private readonly Task authenticationStateTask = defaultUnauthenticatedTask;
21 |
22 | public PersistentAuthenticationStateProvider(PersistentComponentState state)
23 | {
24 | if (!state.TryTakeFromJson(nameof(UserInfo), out var userInfo) || userInfo is null)
25 | {
26 | return;
27 | }
28 |
29 | Claim[] claims = [
30 | new Claim(ClaimTypes.NameIdentifier, userInfo.UserId),
31 | new Claim(ClaimTypes.Name, userInfo.Email),
32 | new Claim(ClaimTypes.Email, userInfo.Email) ];
33 |
34 | authenticationStateTask = Task.FromResult(
35 | new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity(claims,
36 | authenticationType: nameof(PersistentAuthenticationStateProvider)))));
37 | }
38 |
39 | public override Task GetAuthenticationStateAsync() => authenticationStateTask;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Layout/MainLayout.razor.css:
--------------------------------------------------------------------------------
1 | .page {
2 | position: relative;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | main {
8 | flex: 1;
9 | }
10 |
11 | .sidebar {
12 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
13 | }
14 |
15 | .top-row {
16 | background-color: #f7f7f7;
17 | border-bottom: 1px solid #d6d5d5;
18 | justify-content: flex-end;
19 | height: 3.5rem;
20 | display: flex;
21 | align-items: center;
22 | }
23 |
24 | .top-row ::deep a, .top-row ::deep .btn-link {
25 | white-space: nowrap;
26 | margin-left: 1.5rem;
27 | text-decoration: none;
28 | }
29 |
30 | .top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
31 | text-decoration: underline;
32 | }
33 |
34 | .top-row ::deep a:first-child {
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | }
38 |
39 | @media (max-width: 640.98px) {
40 | .top-row {
41 | justify-content: space-between;
42 | }
43 |
44 | .top-row ::deep a, .top-row ::deep .btn-link {
45 | margin-left: 0;
46 | }
47 | }
48 |
49 | @media (min-width: 641px) {
50 | .page {
51 | flex-direction: row;
52 | }
53 |
54 | .sidebar {
55 | width: 250px;
56 | height: 100vh;
57 | position: sticky;
58 | top: 0;
59 | }
60 |
61 | .top-row {
62 | position: sticky;
63 | top: 0;
64 | z-index: 1;
65 | }
66 |
67 | .top-row.auth ::deep a:first-child {
68 | flex: 1;
69 | text-align: right;
70 | width: 0;
71 | }
72 |
73 | .top-row, article {
74 | padding-left: 2rem !important;
75 | padding-right: 1.5rem !important;
76 | }
77 | }
78 |
79 | #blazor-error-ui {
80 | background: lightyellow;
81 | bottom: 0;
82 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
83 | display: none;
84 | left: 0;
85 | padding: 0.6rem 1.25rem 0.7rem 1.25rem;
86 | position: fixed;
87 | width: 100%;
88 | z-index: 1000;
89 | }
90 |
91 | #blazor-error-ui .dismiss {
92 | cursor: pointer;
93 | position: absolute;
94 | right: 0.75rem;
95 | top: 0.5rem;
96 | }
97 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Pages/ConfirmEmailChange.razor:
--------------------------------------------------------------------------------
1 | @page "/Account/ConfirmEmailChange"
2 |
3 | @using System.Text
4 | @using Microsoft.AspNetCore.Identity
5 | @using Microsoft.AspNetCore.WebUtilities
6 | @using AppStatServer.Data
7 |
8 | @inject UserManager UserManager
9 | @inject SignInManager SignInManager
10 | @inject IdentityRedirectManager RedirectManager
11 |
12 | Confirm email change
13 |
14 |
Confirm email change
15 |
16 |
17 |
18 | @code {
19 | private string? message;
20 |
21 | [CascadingParameter]
22 | private HttpContext HttpContext { get; set; } = default!;
23 |
24 | [SupplyParameterFromQuery]
25 | private string? UserId { get; set; }
26 |
27 | [SupplyParameterFromQuery]
28 | private string? Email { get; set; }
29 |
30 | [SupplyParameterFromQuery]
31 | private string? Code { get; set; }
32 |
33 | protected override async Task OnInitializedAsync()
34 | {
35 | if (UserId is null || Email is null || Code is null)
36 | {
37 | RedirectManager.RedirectToWithStatus(
38 | "Account/Login", "Error: Invalid email change confirmation link.", HttpContext);
39 | }
40 |
41 | var user = await UserManager.FindByIdAsync(UserId);
42 | if (user is null)
43 | {
44 | message = "Unable to find user with Id '{userId}'";
45 | return;
46 | }
47 |
48 | var code = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(Code));
49 | var result = await UserManager.ChangeEmailAsync(user, Email, code);
50 | if (!result.Succeeded)
51 | {
52 | message = "Error changing email.";
53 | return;
54 | }
55 |
56 | // In our UI email and user name are one and the same, so when we update the email
57 | // we need to update the user name.
58 | var setUserNameResult = await UserManager.SetUserNameAsync(user, Email);
59 | if (!setUserNameResult.Succeeded)
60 | {
61 | message = "Error changing user name.";
62 | return;
63 | }
64 |
65 | await SignInManager.RefreshSignInAsync(user);
66 | message = "Thank you for confirming your email change.";
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Pages/Manage/Disable2fa.razor:
--------------------------------------------------------------------------------
1 | @page "/Account/Manage/Disable2fa"
2 |
3 | @using Microsoft.AspNetCore.Identity
4 | @using AppStatServer.Data
5 |
6 | @inject UserManager UserManager
7 | @inject IdentityUserAccessor UserAccessor
8 | @inject IdentityRedirectManager RedirectManager
9 | @inject ILogger Logger
10 |
11 | Disable two-factor authentication (2FA)
12 |
13 |
14 |
Disable two-factor authentication (2FA)
15 |
16 |
17 |
18 | This action only disables 2FA.
19 |
20 |
21 | Disabling 2FA does not change the keys used in authenticator apps. If you wish to change the key
22 | used in an authenticator app you should reset your authenticator keys.
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 | @code {
34 | private ApplicationUser user = default!;
35 |
36 | [CascadingParameter]
37 | private HttpContext HttpContext { get; set; } = default!;
38 |
39 | protected override async Task OnInitializedAsync()
40 | {
41 | user = await UserAccessor.GetRequiredUserAsync(HttpContext);
42 |
43 | if (HttpMethods.IsGet(HttpContext.Request.Method) && !await UserManager.GetTwoFactorEnabledAsync(user))
44 | {
45 | throw new InvalidOperationException("Cannot disable 2FA for user as it's not currently enabled.");
46 | }
47 | }
48 |
49 | private async Task OnSubmitAsync()
50 | {
51 | var disable2faResult = await UserManager.SetTwoFactorEnabledAsync(user, false);
52 | if (!disable2faResult.Succeeded)
53 | {
54 | throw new InvalidOperationException("Unexpected error occurred disabling 2FA.");
55 | }
56 |
57 | var userId = await UserManager.GetUserIdAsync(user);
58 | Logger.LogInformation("User with ID '{UserId}' has disabled 2fa.", userId);
59 | RedirectManager.RedirectToWithStatus(
60 | "Account/Manage/TwoFactorAuthentication",
61 | "2fa has been disabled. You can reenable 2fa when you setup an authenticator app",
62 | HttpContext);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/IdentityRedirectManager.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components;
2 | using System.Diagnostics.CodeAnalysis;
3 |
4 | namespace AppStatServer.Components.Account
5 | {
6 | internal sealed class IdentityRedirectManager(NavigationManager navigationManager)
7 | {
8 | public const string StatusCookieName = "Identity.StatusMessage";
9 |
10 | private static readonly CookieBuilder StatusCookieBuilder = new()
11 | {
12 | SameSite = SameSiteMode.Strict,
13 | HttpOnly = true,
14 | IsEssential = true,
15 | MaxAge = TimeSpan.FromSeconds(5),
16 | };
17 |
18 | [DoesNotReturn]
19 | public void RedirectTo(string? uri)
20 | {
21 | uri ??= "";
22 |
23 | // Prevent open redirects.
24 | if (!Uri.IsWellFormedUriString(uri, UriKind.Relative))
25 | {
26 | uri = navigationManager.ToBaseRelativePath(uri);
27 | }
28 |
29 | // During static rendering, NavigateTo throws a NavigationException which is handled by the framework as a redirect.
30 | // So as long as this is called from a statically rendered Identity component, the InvalidOperationException is never thrown.
31 | navigationManager.NavigateTo(uri);
32 | throw new InvalidOperationException($"{nameof(IdentityRedirectManager)} can only be used during static rendering.");
33 | }
34 |
35 | [DoesNotReturn]
36 | public void RedirectTo(string uri, Dictionary queryParameters)
37 | {
38 | var uriWithoutQuery = navigationManager.ToAbsoluteUri(uri).GetLeftPart(UriPartial.Path);
39 | var newUri = navigationManager.GetUriWithQueryParameters(uriWithoutQuery, queryParameters);
40 | RedirectTo(newUri);
41 | }
42 |
43 | [DoesNotReturn]
44 | public void RedirectToWithStatus(string uri, string message, HttpContext context)
45 | {
46 | context.Response.Cookies.Append(StatusCookieName, message, StatusCookieBuilder.Build(context));
47 | RedirectTo(uri);
48 | }
49 |
50 | private string CurrentPath => navigationManager.ToAbsoluteUri(navigationManager.Uri).GetLeftPart(UriPartial.Path);
51 |
52 | [DoesNotReturn]
53 | public void RedirectToCurrentPage() => RedirectTo(CurrentPath);
54 |
55 | [DoesNotReturn]
56 | public void RedirectToCurrentPageWithStatus(string message, HttpContext context)
57 | => RedirectToWithStatus(CurrentPath, message, context);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Pages/RegisterConfirmation.razor:
--------------------------------------------------------------------------------
1 | @page "/Account/RegisterConfirmation"
2 |
3 | @using System.Text
4 | @using Microsoft.AspNetCore.Identity
5 | @using Microsoft.AspNetCore.WebUtilities
6 | @using AppStatServer.Data
7 |
8 | @inject UserManager UserManager
9 | @inject IEmailSender EmailSender
10 | @inject NavigationManager NavigationManager
11 | @inject IdentityRedirectManager RedirectManager
12 |
13 | Register confirmation
14 |
15 |
Register confirmation
16 |
17 |
18 |
19 | @if (emailConfirmationLink is not null)
20 | {
21 |
22 | This app does not currently have a real email sender registered, see these docs for how to configure a real email sender.
23 | Normally this would be emailed: Click here to confirm your account
24 |
26 | If you lose your device and don't have the recovery codes you will lose access to your account.
27 |
28 |
29 | Generating new recovery codes does not change the keys used in authenticator apps. If you wish to change the key
30 | used in an authenticator app you should reset your authenticator keys.
31 |
18 | You have requested to log in with a recovery code. This login will not be remembered until you provide
19 | an authenticator app code at log in or disable 2FA and log in again.
20 |
56 |
57 | @code {
58 | private IEnumerable? identityErrors;
59 |
60 | [SupplyParameterFromForm]
61 | private InputModel Input { get; set; } = new();
62 |
63 | [SupplyParameterFromQuery]
64 | private string? ReturnUrl { get; set; }
65 |
66 | private string? Message => identityErrors is null ? null : $"Error: {string.Join(", ", identityErrors.Select(error => error.Description))}";
67 |
68 | public async Task RegisterUser(EditContext editContext)
69 | {
70 | var user = CreateUser();
71 |
72 | await UserStore.SetUserNameAsync(user, Input.Email, CancellationToken.None);
73 | var emailStore = GetEmailStore();
74 | await emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
75 | var result = await UserManager.CreateAsync(user, Input.Password);
76 |
77 | if (!result.Succeeded)
78 | {
79 | identityErrors = result.Errors;
80 | return;
81 | }
82 |
83 | Logger.LogInformation("User created a new account with password.");
84 |
85 | var userId = await UserManager.GetUserIdAsync(user);
86 | var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
87 | code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
88 | var callbackUrl = NavigationManager.GetUriWithQueryParameters(
89 | NavigationManager.ToAbsoluteUri("Account/ConfirmEmail").AbsoluteUri,
90 | new Dictionary { ["userId"] = userId, ["code"] = code, ["returnUrl"] = ReturnUrl });
91 |
92 | await EmailSender.SendConfirmationLinkAsync(user, Input.Email, HtmlEncoder.Default.Encode(callbackUrl));
93 |
94 | if (UserManager.Options.SignIn.RequireConfirmedAccount)
95 | {
96 | RedirectManager.RedirectTo(
97 | "Account/RegisterConfirmation",
98 | new() { ["email"] = Input.Email, ["returnUrl"] = ReturnUrl });
99 | }
100 |
101 | await SignInManager.SignInAsync(user, isPersistent: false);
102 | RedirectManager.RedirectTo(ReturnUrl);
103 | }
104 |
105 | private ApplicationUser CreateUser()
106 | {
107 | try
108 | {
109 | return Activator.CreateInstance();
110 | }
111 | catch
112 | {
113 | throw new InvalidOperationException($"Can't create an instance of '{nameof(ApplicationUser)}'. " +
114 | $"Ensure that '{nameof(ApplicationUser)}' is not an abstract class and has a parameterless constructor.");
115 | }
116 | }
117 |
118 | private IUserEmailStore GetEmailStore()
119 | {
120 | if (!UserManager.SupportsUserEmail)
121 | {
122 | throw new NotSupportedException("The default UI requires a user store with email support.");
123 | }
124 | return (IUserEmailStore)UserStore;
125 | }
126 |
127 | private sealed class InputModel
128 | {
129 | [Required]
130 | [EmailAddress]
131 | [Display(Name = "Email")]
132 | public string Email { get; set; } = "";
133 |
134 | [Required]
135 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
136 | [DataType(DataType.Password)]
137 | [Display(Name = "Password")]
138 | public string Password { get; set; } = "";
139 |
140 | [DataType(DataType.Password)]
141 | [Display(Name = "Confirm password")]
142 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
143 | public string ConfirmPassword { get; set; } = "";
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Sentry/Event.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 |
3 | namespace AppStatServer.Sentry;
4 |
5 | public class ExceptionValue
6 | {
7 | public string type { get; set; }
8 | public string value { get; set; }
9 | public string module { get; set; }
10 | public int thread_id { get; set; }
11 | }
12 |
13 | public class StacktraceFrame
14 | {
15 | public string function { get; set; }
16 | public bool in_app { get; set; }
17 | public string package { get; set; }
18 | public string instruction_addr { get; set; }
19 | public string addr_mode { get; set; }
20 | public string function_id { get; set; }
21 | public string filename { get; set; }
22 | public int? lineno { get; set; }
23 | public int? colno { get; set; }
24 | public string abs_path { get; set; }
25 | }
26 |
27 | public class StacktraceValue
28 | {
29 | public List? frames { get; set; }
30 |
31 | public override string ToString()
32 | {
33 | if (frames == null)
34 | return "";
35 | return FormatStackTrace(frames);
36 | }
37 |
38 | public static string FormatStackTrace(List stackTraceFrames)
39 | {
40 | StringBuilder formattedStackTrace = new StringBuilder();
41 | int frameIndex = 1;
42 | foreach (var frame in stackTraceFrames)
43 | {
44 | if (frameIndex == 1)
45 | {
46 | formattedStackTrace.AppendLine($"Exception in thread \"{frame.package}\" {frame.function}");
47 | }
48 | else
49 | {
50 | formattedStackTrace.AppendLine($"\tat {frame.package}.{frame.function}({frame.filename}:{frame.lineno})");
51 | }
52 | frameIndex++;
53 | }
54 | return formattedStackTrace.ToString();
55 | }
56 | }
57 |
58 | public class ExceptionInfo
59 | {
60 | public List values { get; set; }
61 | }
62 |
63 | public class ThreadValue
64 | {
65 | public int id { get; set; }
66 | public string name { get; set; }
67 | public bool crashed { get; set; }
68 | public bool current { get; set; }
69 | public StacktraceValue stacktrace { get; set; }
70 | }
71 |
72 | public class Threads
73 | {
74 | public List values { get; set; }
75 | }
76 |
77 | public class CurrentCulture
78 | {
79 | public string name { get; set; }
80 | public string display_name { get; set; }
81 | public string calendar { get; set; }
82 | }
83 |
84 | public class DynamicCode
85 | {
86 | public bool Compiled { get; set; }
87 | public bool Supported { get; set; }
88 | }
89 |
90 | public class MemoryInfo
91 | {
92 | public int allocated_bytes { get; set; }
93 | public long high_memory_load_threshold_bytes { get; set; }
94 | public long total_available_memory_bytes { get; set; }
95 | public int finalization_pending_count { get; set; }
96 | public bool compacted { get; set; }
97 | public bool concurrent { get; set; }
98 | public List pause_durations { get; set; }
99 | }
100 |
101 | public class ThreadPoolInfo
102 | {
103 | public int min_worker_threads { get; set; }
104 | public int min_completion_port_threads { get; set; }
105 | public int max_worker_threads { get; set; }
106 | public int max_completion_port_threads { get; set; }
107 | public int available_worker_threads { get; set; }
108 | public int available_completion_port_threads { get; set; }
109 | }
110 |
111 | public class AppInfo
112 | {
113 | public string type { get; set; }
114 | public DateTime app_start_time { get; set; }
115 | public bool in_foreground { get; set; }
116 | }
117 |
118 | public class Device
119 | {
120 | public string type { get; set; }
121 | public string timezone { get; set; }
122 | public string timezone_display_name { get; set; }
123 | public DateTime boot_time { get; set; }
124 | }
125 |
126 | public class Os
127 | {
128 | public string type { get; set; }
129 | public string raw_description { get; set; }
130 | }
131 |
132 | public class Runtime
133 | {
134 | public string type { get; set; }
135 | public string name { get; set; }
136 | public string version { get; set; }
137 | public string raw_description { get; set; }
138 | public string identifier { get; set; }
139 | }
140 |
141 | public class TraceInfo
142 | {
143 | public string type { get; set; }
144 | public string span_id { get; set; }
145 | public string trace_id { get; set; }
146 | }
147 |
148 | public class Package
149 | {
150 | public string name { get; set; }
151 | public string version { get; set; }
152 | }
153 |
154 | public class SdkInfo
155 | {
156 | public List packages { get; set; }
157 | public string name { get; set; }
158 | public string version { get; set; }
159 | }
160 |
161 | public class Image
162 | {
163 | public string type { get; set; }
164 | public string debug_id { get; set; }
165 | public string debug_checksum { get; set; }
166 | public string debug_file { get; set; }
167 | public string code_id { get; set; }
168 | public string code_file { get; set; }
169 | }
170 |
171 | public class DebugMeta
172 | {
173 | public List images { get; set; }
174 | }
175 |
176 | public class Contexts
177 | {
178 | public CurrentCulture CurrentCulture { get; set; }
179 | public DynamicCode DynamicCode { get; set; }
180 | public MemoryInfo MemoryInfo { get; set; }
181 | public ThreadPoolInfo ThreadPoolInfo { get; set; }
182 | public AppInfo app { get; set; }
183 | public Device device { get; set; }
184 | public Os os { get; set; }
185 | public Runtime runtime { get; set; }
186 | public TraceInfo trace { get; set; }
187 | }
188 |
189 | public class User
190 | {
191 | public string ip_address { get; set; }
192 | public string id { get; set; }
193 | public string username { get; set; }
194 | }
195 |
196 | public class LogEntry
197 | {
198 | public string message { get; set; }
199 | }
200 |
201 | public class EventEntry
202 | {
203 | public string event_id { get; set; }
204 | public DateTime timestamp { get; set; }
205 | public LogEntry logentry { get; set; }
206 | public string platform { get; set; }
207 | public string release { get; set; }
208 | public ExceptionInfo exception { get; set; }
209 | public Threads threads { get; set; }
210 | public string level { get; set; }
211 | public Dictionary request { get; set; }
212 | public Contexts contexts { get; set; }
213 | public User user { get; set; }
214 | public string environment { get; set; }
215 | public SdkInfo sdk { get; set; }
216 | public DebugMeta debug_meta { get; set; }
217 | }
--------------------------------------------------------------------------------
/Source/AppStatServer/AppStatServer/AppStatServer/Components/Account/Pages/Manage/EnableAuthenticator.razor:
--------------------------------------------------------------------------------
1 | @page "/Account/Manage/EnableAuthenticator"
2 |
3 | @using System.ComponentModel.DataAnnotations
4 | @using System.Globalization
5 | @using System.Text
6 | @using System.Text.Encodings.Web
7 | @using Microsoft.AspNetCore.Identity
8 | @using AppStatServer.Data
9 |
10 | @inject UserManager UserManager
11 | @inject IdentityUserAccessor UserAccessor
12 | @inject UrlEncoder UrlEncoder
13 | @inject IdentityRedirectManager RedirectManager
14 | @inject ILogger Logger
15 |
16 | Configure authenticator app
17 |
18 | @if (recoveryCodes is not null)
19 | {
20 |
21 | }
22 | else
23 | {
24 |
25 |
Configure authenticator app
26 |
27 |
To use an authenticator app go through the following steps:
28 |
29 |
30 |
31 | Download a two-factor authenticator app like Microsoft Authenticator for
32 | Android and
33 | iOS or
34 | Google Authenticator for
35 | Android and
36 | iOS.
37 |
38 |
39 |
40 |
Scan the QR Code or enter this key @sharedKey into your two factor authenticator app. Spaces and casing do not matter.
47 | Once you have scanned the QR code or input the key above, your two factor authentication app will provide you
48 | with a unique code. Enter the code in the confirmation box below.
49 |
27 | You've successfully authenticated with @ProviderDisplayName.
28 | Please enter an email address for this site below and click the Register button to finish
29 | logging in.
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @code {
48 | public const string LoginCallbackAction = "LoginCallback";
49 |
50 | private string? message;
51 | private ExternalLoginInfo externalLoginInfo = default!;
52 |
53 | [CascadingParameter]
54 | private HttpContext HttpContext { get; set; } = default!;
55 |
56 | [SupplyParameterFromForm]
57 | private InputModel Input { get; set; } = new();
58 |
59 | [SupplyParameterFromQuery]
60 | private string? RemoteError { get; set; }
61 |
62 | [SupplyParameterFromQuery]
63 | private string? ReturnUrl { get; set; }
64 |
65 | [SupplyParameterFromQuery]
66 | private string? Action { get; set; }
67 |
68 | private string? ProviderDisplayName => externalLoginInfo.ProviderDisplayName;
69 |
70 | protected override async Task OnInitializedAsync()
71 | {
72 | if (RemoteError is not null)
73 | {
74 | RedirectManager.RedirectToWithStatus("Account/Login", $"Error from external provider: {RemoteError}", HttpContext);
75 | }
76 |
77 | var info = await SignInManager.GetExternalLoginInfoAsync();
78 | if (info is null)
79 | {
80 | RedirectManager.RedirectToWithStatus("Account/Login", "Error loading external login information.", HttpContext);
81 | }
82 |
83 | externalLoginInfo = info;
84 |
85 | if (HttpMethods.IsGet(HttpContext.Request.Method))
86 | {
87 | if (Action == LoginCallbackAction)
88 | {
89 | await OnLoginCallbackAsync();
90 | return;
91 | }
92 |
93 | // We should only reach this page via the login callback, so redirect back to
94 | // the login page if we get here some other way.
95 | RedirectManager.RedirectTo("Account/Login");
96 | }
97 | }
98 |
99 | private async Task OnLoginCallbackAsync()
100 | {
101 | // Sign in the user with this external login provider if the user already has a login.
102 | var result = await SignInManager.ExternalLoginSignInAsync(
103 | externalLoginInfo.LoginProvider,
104 | externalLoginInfo.ProviderKey,
105 | isPersistent: false,
106 | bypassTwoFactor: true);
107 |
108 | if (result.Succeeded)
109 | {
110 | Logger.LogInformation(
111 | "{Name} logged in with {LoginProvider} provider.",
112 | externalLoginInfo.Principal.Identity?.Name,
113 | externalLoginInfo.LoginProvider);
114 | RedirectManager.RedirectTo(ReturnUrl);
115 | }
116 | else if (result.IsLockedOut)
117 | {
118 | RedirectManager.RedirectTo("Account/Lockout");
119 | }
120 |
121 | // If the user does not have an account, then ask the user to create an account.
122 | if (externalLoginInfo.Principal.HasClaim(c => c.Type == ClaimTypes.Email))
123 | {
124 | Input.Email = externalLoginInfo.Principal.FindFirstValue(ClaimTypes.Email) ?? "";
125 | }
126 | }
127 |
128 | private async Task OnValidSubmitAsync()
129 | {
130 | var emailStore = GetEmailStore();
131 | var user = CreateUser();
132 |
133 | await UserStore.SetUserNameAsync(user, Input.Email, CancellationToken.None);
134 | await emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
135 |
136 | var result = await UserManager.CreateAsync(user);
137 | if (result.Succeeded)
138 | {
139 | result = await UserManager.AddLoginAsync(user, externalLoginInfo);
140 | if (result.Succeeded)
141 | {
142 | Logger.LogInformation("User created an account using {Name} provider.", externalLoginInfo.LoginProvider);
143 |
144 | var userId = await UserManager.GetUserIdAsync(user);
145 | var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
146 | code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code));
147 |
148 | var callbackUrl = NavigationManager.GetUriWithQueryParameters(
149 | NavigationManager.ToAbsoluteUri("Account/ConfirmEmail").AbsoluteUri,
150 | new Dictionary { ["userId"] = userId, ["code"] = code });
151 | await EmailSender.SendConfirmationLinkAsync(user, Input.Email, HtmlEncoder.Default.Encode(callbackUrl));
152 |
153 | // If account confirmation is required, we need to show the link if we don't have a real email sender
154 | if (UserManager.Options.SignIn.RequireConfirmedAccount)
155 | {
156 | RedirectManager.RedirectTo("Account/RegisterConfirmation", new() { ["email"] = Input.Email });
157 | }
158 |
159 | await SignInManager.SignInAsync(user, isPersistent: false, externalLoginInfo.LoginProvider);
160 | RedirectManager.RedirectTo(ReturnUrl);
161 | }
162 | }
163 |
164 | message = $"Error: {string.Join(",", result.Errors.Select(error => error.Description))}";
165 | }
166 |
167 | private ApplicationUser CreateUser()
168 | {
169 | try
170 | {
171 | return Activator.CreateInstance();
172 | }
173 | catch
174 | {
175 | throw new InvalidOperationException($"Can't create an instance of '{nameof(ApplicationUser)}'. " +
176 | $"Ensure that '{nameof(ApplicationUser)}' is not an abstract class and has a parameterless constructor");
177 | }
178 | }
179 |
180 | private IUserEmailStore GetEmailStore()
181 | {
182 | if (!UserManager.SupportsUserEmail)
183 | {
184 | throw new NotSupportedException("The default UI requires a user store with email support.");
185 | }
186 | return (IUserEmailStore)UserStore;
187 | }
188 |
189 | private sealed class InputModel
190 | {
191 | [Required]
192 | [EmailAddress]
193 | public string Email { get; set; } = "";
194 | }
195 | }
196 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 | /Source/AppStatServer/AppStatServer/AppStatServer/appstat.db
400 | /Source/AppStatServer/AppStatServer/AppStatServer/appsettings.json
401 |
--------------------------------------------------------------------------------