c#


ASP.NET Identity Check email existence in custom UserValidator implementation


In my application I created a custom version of the UserValidator so that I can configure the error messages myself.
Currently it's basically the implementation as found here, but with other resourcefile references.
The part I get stuck on is within the ValidateEmailAsync method.
It contains the line:
var email = await Manager.GetEmailStore().GetEmailAsync(user).WithCurrentCulture();
This gives the error that it cannot access GetEmailStore() method, since it's an internal method of the UserManager object.
Searching for a fix for that lead me to this question, and there it's advised to use this line instead:
var email = await Manager.GetEmailAsync(user.Id).ConfigureAwait(false);
But executing on that gives the exception that it couldn't find any user with the given Id.
Is there any other way to retrieve the email property for IUser object?
If needed, here's my current code.

Related Links

How to start with Windows Service?
What is the best way to create dynamic GUI in .net?
Repeater inside datalist
Removing HTML Comments
C# Multi Thread Concept Question
Creation of Builders in Builder Pattern
What is an IoC child container and how are they used?
Detecting if two images are similar
C# Stop Person From Typing In Option In Drop Down Combo Box
Prompt Dialog in Windows Forms
simple question about Enums
Push notifications for desktop apps?
Handler Image Display on Null Problem
C++/CLI wrapper for native C/C++ code, unable to load in Unity3D
Use Constraint delaunay triangulation to Triangulate a Polygon
How to send data when using Oracle Change notification from Data Access layer to Application layer

Categories

HOME
postgresql
oop
google-cloud-pubsub
twitter-bootstrap
salesforce
pyspark
python-requests
bigtable
opencv4android
pandoc
ms-application-insights
snmp
zabbix
sitemap
doctrine2
webpack-dev-server
unreal-engine4
websharper
desktop-application
fine-uploader
swift3.1
opendaylight
game-engine
internet-explorer-7
powerpivot
orange
autologin
single-page-application
openoffice-basic
vala
opengraph
fastboot
matlab-gui
concatenation
advertising
handle
visual-studio-community
meteor-accounts
deferred
exacttarget
urhosharp
ng2-bootstrap
storefront
ilog
angularjs-resource
mootools
abide
anypoint-studio
framebuffer
ngrok
linkurious
cowboy
qt-quick
cakephp-3.2
xmldom
noise
google-cloud-shell
wink
petapoco
timex
apache-commons-cli
tinybox2
cherry-pick
avaudiorecorder
shtml
usps
bbedit
ideavim
code-translation
jsondoc
dday
angular-promise
producer-consumer
adempiere
p4python
teamwork
xcode5
react-os
sat4j
behance-api
farpoint-spread
xcode6.1-gm-seed
thucydides
xcode5.1
google-oauth-java-client
kendo-window
windows-scheduler
servicemanager
database-restore
nsregularexpression
github-archive
parsec
helicontech
utm
xhtmlrenderer
lwp
cryptolicensing
html5-animation
llblgen
fxcopcmd
text-manipulation
helios
appointment
zend-acl
asp.net-1.1
weak-typing

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile