Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

logging with Rachel@contoso.com email breaks the app inn error system.NullReferenceException

Open
#1,467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
backend, databases

Research direction

Start with the SessionContextInterceptor stack frame and the System.Web.HttpContext.Current.User.Identity.GetUserId() expression shown in the report. Reproduce the sign-in with the supplied account, then inspect which object is null and whether configuration or authentication state causes it. Done means the sign-in path no longer throws the reported NullReferenceException.

Written by the indexing model from the issue text.

Description

I run the application and it works like a charm. However, when I sign in with
Rachel@contoso.com/Password!1)

app breaks into visual studio with following error

'System.Web.HttpContext.Current.User.Identity.GetUserId()' threw an exception of type 'System.NullReferenceException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2147467261
HelpLink: null
InnerException: null
Message: "Object reference not set to an instance of an object."
Source: "cc53859f7132494ca0035755d0785890"
StackTrace: " at <>x.<>m0(SessionContextInterceptor <>4__this, DbConnection connection, DbConnectionInterceptionContext interceptionContext)"
TargetSite: {System.String <>m0(ContactManager.Models.SessionContextInterceptor, System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext)}

Am I missing something from config stuff? Thanks

Image
Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/sql-server-samples

All issues in microsoft/sql-server-samples

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.