microsoft / microsoft/sql-server-samples
logging with Rachel@contoso.com email breaks the app inn error system.NullReferenceException
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- csharp
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100