ASP.NET Identity account management - Register & Login

MECressey's Avatar


24 Jun, 2017 12:20 PM


My ASP.NET MVC app uses the re-made Identity account management pages and database. During Register, I enabled an SMTP email confirmation to confirm the user's registration. I had to add <mailSettings> to my Web.config and enable code in the AccountCounter Register function (UserManager.SendEmailAsync). This works on my local machine but doesn't appear to work on AppHarbor. Is there anything that needs to be done to make SendEmailAsync to work?



  1. Support Staff 1 Posted by rune on 29 Jun, 2017 04:26 AM

    rune's Avatar

    Hi Mike,

    How are the mailSettings currently configured? Are you using an external service to send emails, or do you rely on your own machine to handle that part (e.g. with a development email server)? If it's the latter you'll need to configure your SMTP settings to use a service available to your AppHarbor app as we don't support sending emails from our servers.

    You may want to try and just install the Mailgun add-on as that will replace the configuration on deployment -- take a look at this KB article for more information on that and a few other services you may want to try!


  2. 2 Posted by MECressey on 29 Jun, 2017 12:24 PM

    MECressey's Avatar

    Hi Rune,

    Thanks for replying. I actually got the email to send using the Gmail SMTP server - The issue I was having had to do with authenticating with the gmail.

    But the link that it generated to confirm registration did not work. When it redirected back to appharbor, it just hung. I don't think I even got an error message.
     Unfortunately, I don't have the link anymore (but maybe I can get it). Of course, it worked when I tested it locally.

    The register/login/confirm/reset is all out-of-the-box code that is generated for you by Visual Studio when you use ASP.NET Identity configuration.


  3. Support Staff 3 Posted by rune on 29 Jun, 2017 11:48 PM

    rune's Avatar

    Hi Mike,

    Ok yeah it'd be really helpful if you could get or generate a new link so I can take a look -- I suspect it may be an issue with the link being generated with the backend worker's port, or perhaps with the wrong hostname. If that's the case I'd recommend you take a look at this KB article for a couple of tips and tricks to generate absolute URLs without port numbers.

    If that doesn't help or you get a new link that just "hangs" then please feel free to reach out!


Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac