asp.net - SENDGRID email confirmation -



asp.net - SENDGRID email confirmation -

im trying utilize email verification sendgrid. error im getting while trying register using http://goo.gl/77wxpt tutorial :

bad request

description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code.

exception details: system.exception: bad request

source error:

if (transportweb != null) { await transportweb.deliverasync(mymessage); } else

and source code of identityconfig.cs is:

public class emailservice : iidentitymessageservice { public async task sendasync(identitymessage message) { await configsendgridasync(message); } // utilize nuget install sendgrid (basic c# client lib) private async task configsendgridasync(identitymessage message) { var mymessage = new sendgridmessage(); mymessage.addto(message.destination); mymessage.from = new system.net.mail.mailaddress( "joe@contoso.com", "joe s."); mymessage.subject = message.subject; mymessage.text = message.body; mymessage.html = message.body; var credentials = new networkcredential( configurationmanager.appsettings["mailaccount"], configurationmanager.appsettings["mailpassword"] ); // create web transport sending email. var transportweb = new web(credentials); // send email. if (transportweb != null) { await transportweb.deliverasync(mymessage); } else { trace.traceerror("failed create web transport."); await task.fromresult(0); } } }

it might problem credentials.

if signed sendgrid through windows azure, need following:

log in azure portal navigate marketplace locate , click on sendgrid application down @ bottom, click on connection info use username , password listed.

i under impression utilize azure business relationship password until found this. hope corrects problem did me.

asp.net asp.net-identity sendgrid email-confirmation

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -