Security Idenitity 2.0 Email Confirmation Token Create with one account validate with a different account

Howdy,
I extended the security model and made it multi-tenant, however when I create a email confirmation token in the admin tool, when I try and validate it, in one of the applications, it fails.  In the admin tool, I create a UserManager with all of
the settings as if it were the application, but when the validation occures in the application it still fails.  The only way I can get it to work, is if I use the same app pool for both the application and the admin, or if I set the user account of both
app Pools to the same service account.  How can I get it to work where I create a token in one app, and validate in another app?  Could I use impersonation?  Is there something I can do to the two service accounts to allow one to generate
a token and the other to validate?

Let's see if I can answer these in order...
1.  We built several web applications using MVC 5.2, EF 6.0, Idenity 2.0
2.  We are using MS Visual Studio 2013, running on VM with Windows Server 2008 R2, .NET 4.5.1
3.  The problem is we want to have each application have a different service account to make them more secure.  We have an admin tool that allows us to add new applications to the Membership database, and new users to those applications.  The
problem occurs when I create an email security token in the admin tool, and send it to the use who is then validated on the specific application.  If I make the service account of the application and the admin the same it works, if not it fails.
I don't think the code is the problem, as it works fine if the service account for the application and the admin are the same.  It only fails when I use seperate service accounts, but here you go.
Admin snippet:
Manage Controller - RegisterUser
varuser =
newApplicationUser()
{ UserName = model.UserName, Email = model.Email, IsActive = model.SelectedIsActive, IsPswdChgRequired = model.SelectedIsPswdChgRequired, TenantId = model.TenantId };
UserManager<ApplicationUser,
int> um = CreateUserManager(Convert.ToInt32(model.SelectedTenantId));
private UserManager<ApplicationUser, int> CreateUserManager(int TenantId)
            var provider = new Microsoft.Owin.Security.DataProtection.DpapiDataProtectionProvider(GetTenantName(TenantId));
            UserManager<ApplicationUser, int> um = new UserManager<ApplicationUser, int>(new ApplicatonUserStore(new ApplicationDbContext()) { TenantId = TenantId });
            um.UserTokenProvider = new Microsoft.AspNet.Identity.Owin.DataProtectorTokenProvider<ApplicationUser, int>(provider.Create("EmailConfirmation"));
Application snippet:
AccountController - constructor
var
provider =
newMicrosoft.Owin.Security.DataProtection.DpapiDataProtectionProvider(ConfigurationManager.AppSettings["TenantName"]);
            userManager.UserTokenProvider =
newMicrosoft.AspNet.Identity.Owin.DataProtectorTokenProvider<ApplicationUser,
int>(provider.Create("EmailConfirmation"));
public async Task<ActionResult> ConfirmEmail(string userId, string ecode, string scode)
            if (userId == null || ecode == null || scode == null)
                return View("Error");
            var result = await UserManager.ConfirmEmailAsync(Convert.ToInt32(userId), ecode);
            if (result.Succeeded)

Similar Messages

  • I'm trying to update a Muse site and it keeps telling me that the site was created with a different version of Muse. I have updated Muse and still can't access the site to make changes.

    I'm trying to update a Muse site and it keeps telling me that the site was created with a different version of Muse. I have updated Muse and still can't access the site to make changes.

    Hi rgarden95,
    Can you please confirm the exact version of Muse you are opening the file with?
    To check the version of Muse, please click on help->About Adobe Muse CC.
    Regards,
    Akshay

  • HT4897 I have more than one iCloud account.... Once an email alias is deleted from one account.... can it then be used by another account?  If so, how long after it's deletion before it's made available?

    I have more than one iCloud account.... Once an email alias is deleted from one account.... can it then be used by another account?  If so, how long after it's deletion before it's made available?

    Aliases remain tied forever to the account which created them. They cannot be moved to another account, converted to a full account, nor reinstated after being deleted.

  • Running OSX10.6.8 two email account thru Roadrunner. Both accounts now indicate email sent but they never arrive. Can get inbound email.  this start for one account 5 days ago and yesterday for the second account. any suggestions?

    Running OSX10.6.8 two email account thru Roadrunner. Both accounts now indicate email sent but they never arrive. Can get inbound email.  this started for one account 5 days ago and yesterday for the second account. any suggestions?

    When we returned from a weekend trip, both emails were working.  The obvious answer [to me anyway] is that the problem was with Roadrunner, not our minimac. The chances of finding out what the problem was with Roadrunner are slim and none.

  • How Can I change my email address or create a new account??

    I need to change my email address of the account or create a new account but when I try to create new one is
    asking me for the password supposing like I have already one...

    At this time, you cannot change the email address for an account. When you sign up for a new account it will ask you to provide a password on the very first page and then confirm it before you continue.
    OTN

  • Recently created a new iCloud account, but want to use my previous iCloud email address (created with a different iCloud account)... help needed!!

    Guys,
    I hope you can help me out on this, but I have a problem...
    A few years ago I created an iCloud account on my old iPhone 4S.
    Back then, I used an email address for iCloud registration that's no longer active.
    Anyway, I also made an iCloud email address back then.
    - Now I have a brand new iPhone 5S (totally love it)... and I just created an iCloud acccount with an other email address than I used back at the time I had my old 4S.
    But... now I would like to use the same 'old' iCloud email address that I used on my previous 4S iCloud account.
    Since that previous iCloud account is linked to an email address that no longer exists, I don't know how to do this!!
    Can someone please help??

    Each of you should set up your separate iCloud account on your own computer using your Apple ID. This gives you two independent iCloud accounts.
    Note that an iPad is not a multi-user device. It can only be synced with one account.

  • I'm getting married and would like to change my iCloud email address or create another one

    i'm getting married and would like to change my mobileme/icloud email address to my new name. i've tried to create alias but it keeps saying cannot save address at this time? any tips? can i have 2 icloud email addresses?

    Welcome to the Apple Community.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    You can change your details at the address above (you can't change your ID if it's a me address).
    You can of course create a new account at any time and add it as a secondary to your existing account or use it as a primary account and add your existing account as a secondary account.

  • Email not connecting on 3G - one account is not showing up in accounts

    I just got my iPhone and I set up three email accounts. They were all working fine, then I noticed they weren't getting any new mail and the little connection wheel at the bottom just went around endlessly.
    I tried turning one account on and then off in the settings, but that seems to have just made it disappear from the list of available email accounts in mail/accounts.
    I have WiFi off because I wasn't in an area with any WiFi.
    I admit, coming from a blackberry, it is severe withdrawal to have no email working at all, and no phone support or easy fix (the next Genius bar appt here is in 3 days- AND I have to go to a store to fix problems).
    UNLESS- you have a great idea? Please, any help appreciated.

    Do you see the account in the Mail, Contacts & Calendars preference pane?

  • I have an old shuffle that I created with a different email address that I no longer have. is there a way to add these songs to my new account

    I have an old shuffle that I still use with many songs. I created this account with an old email address that I no longer have. Is there any way to transfer these songs to my new account so I may purchase more songs and still use my shuffle? Thank you!

    Basically, no, but as long as all the music is in the same iTunes library and it doesn't contain protected content from more than five Apple IDs, you don't need to. If desired, click here and ask the iTunes Store staff for assistance.
    (124362)

  • If I purchase an entire season for a show, I should get it even if more episodes are added later right? Plus, how do I access an old account without access to the email it was created with?

    Issue 1: I had purchased the entire season of Off Limits, and downloaded the available episodes when purchased, yet the season wasn't over. Since I purchased the entire season, I should be able to get the episodes added since then instead of having to buy them seperately like iTunes is asking me to do correct? Issue 2: Also, I had an old apple id on a computer that crashed and never got the chance to change it over to the new email even if the purchase was transferred via my iPod I was using at the time, and is on the pc i'm using now. Yet when I go to play this file, it asks for the password for the old email account (which I no longer have access to) and this has been nearly 7 years ago so I forgot what the password is to that acct. What do I do to rectify this and play this particular purchase?

    Settings/General/Restrictions - Require Password=Immediately

  • 8100 Pearl - emails being delayed for just one account!??!? HELP!!!

    Can someone help me with this problem please?
    I have a Pearl 8100 which has two HOTMAIL accounts on it, let's call them A and B.
    I can send emails for A and B and the person gets them straight away.
    However if someone sends me an email, to both A and B HOTMAIL account, only B gets it straight away, A gets it hours later.
    I have reset the accounts, sent new services books, everything, I just don't know why this is happening and it's only been happening this last week, before it was instantaneous.
    Does  anyone have any idea why this is happening?
    I've been testing it all week by sending an email from my work email account to both addresses at the same time but only one gets it straight away. I can send without any problems!
    Any thoughts?
    Thanks!

    We use different email accounts but they are synced using mobileme. We are not losing incoming emails on our computers, just on our iphones. Our @me.com mail account is not losing messages either, just our personal email accounts. I am thinking of deleting them from our phones and starting over again.

  • Adobe id email versus a created email for forms central use

    so I have my main adobe id (email address) and purchased my own forms central subscription using it.  I then had my customer purchase their own forms central account with thier own user id (email address).  THEN I actually created a unique email address on my own computer for my customer so that their form confirmations would go there instead of mixing into my personal email.  HOWEVER -- the forms are not functioning properly when using that created email address as a form creator id.  The forms can be built and saved and all the settings are set correctly.  Responses are functioning and going through to the forms central database, and I GET THE EMAIL CONFIRMATIONS onthe created email, BUT the collaborator is not getting them at her address, despite the settings showing they are showing to be routed there.  What is up?  The ONLY thing that has changed from my first test forms (in which all notifications went properly where they needed to go) to my now malfunctioning notifications is the author email (not my "real" adobe id, but the email address I created for the author purpose).  Can y ou help?

    Can you please share the form with me ([email protected]) so we can investigate the issue.
    Thank you,
    Roman

  • Email & Email confirmation

    I entered an Email Address Field followed by an Email Confirmation Field. How do I validate the two fields? Makiing sure that they are identical.
    Ray

    This is something that is not supported in FormsCentral.

  • HT201485 I forget my security answer and rescue email address

    I Forget my security questions and rescue email address...
    mine one is IOS 8.1.2
    i wan to buy iTunes buy it need me to enter security answer but I forget it and i try to reset my security answer but I forget the email address. So how I reset the security answe
    I Forget my security answer and rescue email address ... Hope will get ur help soonest

    You won't be able to view and/or change your rescue email address until you can answer your questions, if you can't remember the address then you will have to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/en-us/HT5699
    If your country isn't on that page then try this form and explain and see what they reply with : https://ssl.apple.com/emea/support/itunes/contact.html
    When they've been reset you can then view (and/or change) your rescue email address for potential future use : http://support.apple.com/en-us/HT201356

  • I have 2 accounts. One for my emails and FaceTime, and the other for the iTunes store, iMessage etc. Is there any way to merge all of those into one account?

    My emails and factime are on one account (i.e. my MobileMe account) and my Apple ID (i.e. imessage, itunes, app store etc) is on another account. I primarily wanted to make my MobileMe account my iCloud account, however I had to create a new account to do so, so I made a hotmail account because it didn't work again with MobileMe. But now I want all the iCloud data to be transferred from my hotmail account (Apple ID) to my MobileMe account, so I then have one account for everything (facetime, mails, imessage, app store etc). Is this possible?

    You can't merge accounts or transfer iTunes purchases from one Apple ID to another: but there is no problem about using two IDs.
    Use your iCloud ID for iCloud for syncing email, contacts, calendars, bookmarks, and PhotoStream.
    Use your other Apple ID as before for iTunes, iTunes in the Cloud and iTunes Match.
    There's no conflict about doing this, and you won't even notice as Keychain will log you in with the correct ID in each case. It's also better security not to have your iTunes login also your email address, given the number of complaints about hacked iTunes accounts.

Maybe you are looking for

  • Recovering Files in Trash with Time Machine?

    Hey guys, So I have some files that I desperately need to recover that I put in my trash a while ago. I am certain they were still in there when I recently backed up my Macbook Pro to Time Machine, but then a week later I accidentally emptied the tra

  • How to find out Standard Functionalities in ECC 6.0

    Hi Friends, Can any one of you, please tell me as how to find out SAP Standard Functionalities of a particular Module in SAP-HCM (Eg: SAP-HR - PA module in ECC 6.0). Thank you in advance and in anticipation of your reply.

  • ICACLS performance issue

    Hi Team, I am trying to Set permissions to 7000 + set of folders from parent to child to change from Full to 770. But this is taking blackberries than 5 minutes to apply. Is there any alternative to Improve the performance of this? Also, the Observed

  • Help needed:What is the Future of Oracle DBA Professional

    Hi Guys, I am new(fresher) to the field of Database administration can u tell me more about the role of a DBA and after 3-5 years of experience where can i find oppurtunities and which companies hire DBA's and does certification help DBA's what edge

  • ClassCastException when invoking remote portlets

    Hi.. I have a 10.3 producer and 8.1 consumer. I get ClassCastException on the JSP when clicked on the RemotePortlet I registered the WSDL and the remote portlets successfully in the portal admin console of consumer. But for some reason i get the foll