Open Closed

Registration Issue on server #2357


User avatar
0
kapil created
  • ABP Framework version: v4.4.4
  • UI type: /MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:

An unhandled exception has occurred while executing the request. System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. [::ffff:207.204.50.44]:25 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.DoMultipleAddressConnectCallback(Object result, MultipleAddressConnectAsyncResult context) --- End of stack trace from previous location --- at System.Net.Sockets.Socket.DoMultipleAddressConnectCallback(Object result, MultipleAddressConnectAsyncResult context) at System.Net.Sockets.Socket.MultipleAddressConnectCallback(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.InitializeConnectionCallback(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result) --- End of inner exception stack trace --- at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.

  • Steps to reproduce the issue:"on server register new user."

28 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    : Failure sending mail. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10013): An attempt was made to access a socket in a way forbidden

    Please use this application to test your email config.

    https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo

  • User Avatar
    0
    kapil created

    I am not able to send mail.

    While Using MailKit error:->

    MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection. The host name did not match the name given in the server's SSL certificate. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.

    While Using Smtp Error:-> Bad sequence of commands. The server response was: you must authenticate first (#5.5.1) This exception was originally thrown at this call stack: [External Code] EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.MailTestService.RunAsync() in Program.cs [External Code] EmailSendDemo.Program.Main(string[]) in Program.cs

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can google the error message. I'm not familiar with this.

  • User Avatar
    0
    kapil created

    i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo

    but not able send mail from ABP Project on server using same credentials.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo

    Are you using MailKit? https://docs.abp.io/en/abp/latest/MailKit

  • User Avatar
    0
    kapil created

    No, we have used inbuilt module of abp for registeration. but i got error on server.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    I am not able to send mail.

    While Using MailKit error:->

    MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection. The host name did not match the name given in the server's SSL certificate. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.

    While Using Smtp Error:-> Bad sequence of commands. The server response was: you must authenticate first (#5.5.1) This exception was originally thrown at this call stack: [External Code] EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.MailTestService.RunAsync() in Program.cs [External Code] EmailSendDemo.Program.Main(string[]) in Program.cs

    Hi @kapil, can you set SecureSocketOption as SecureSocketOptions.SslOnConnect:

    Configure<AbpMailKitOptions>(options =>
    {
        options.SecureSocketOption = SecureSocketOptions.SslOnConnect;
    });
    

    SslOnConnect -> The connection should use SSL or TLS encryption immediately. (http://www.mimekit.net/docs/html/T_MailKit_Security_SecureSocketOptions.htm)

  • User Avatar
    0
    kapil created

    I am not able to send mail.

    While Using MailKit error:->

    MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection.
    The host name did not match the name given in the server's SSL certificate.
    AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.

    While Using Smtp Error:->
    Bad sequence of commands. The server response was: you must authenticate first (#5.5.1)
    This exception was originally thrown at this call stack:
    [External Code]
    EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs
    [External Code]
    EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs
    [External Code]
    EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs
    [External Code]
    EmailSendDemo.MailTestService.RunAsync() in Program.cs
    [External Code]
    EmailSendDemo.Program.Main(string[]) in Program.cs

    Hi @kapil, can you set SecureSocketOption as SecureSocketOptions.SslOnConnect:

    Configure<AbpMailKitOptions>(options => 
    { 
        options.SecureSocketOption = SecureSocketOptions.SslOnConnect; 
    }); 
    

    SslOnConnect -> The connection should use SSL or TLS encryption immediately. (http://www.mimekit.net/docs/html/T_MailKit_Security_SecureSocketOptions.htm)

    I Solve this error now i am able to send mail but using same credential(In Email Settingmanagement) on server its not working. it's through 500 error on register.(I am using inbuilt registration(Account Pro) modules of ABP)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    it's through 500 error

    What's the error detail?

  • User Avatar
    0
    kapil created

    it's through 500 error

    What's the error detail?

    System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location --- at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo

    Can you share the email config with me? liming.ma@volosoft.com

  • User Avatar
    0
    kapil created

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to disable ssl?

    And what's your stmp code?

  • User Avatar
    0
    kapil created

    hi

    Can you try to disable ssl?

    And what's your stmp code?

    i already try that,but same error is thrown

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    it's through 500 error

    What's the error detail?

    System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location --- at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.

    • This error usually occurs if your credentials are not true, please check the email address and password that you've provided.

    • As I see you want to use the Gmail SMTP server. If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm this first, if you haven't yet.

    • If you are sure about your email address-password and confirmed the related section in Gmail, can you try to set your password by using the SettingManager's SetGlobalAsync method :

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
         var settingManager = context.ServiceProvider.GetService&lt;SettingManager&gt;();
         //encrypts the password on set and decrypts on get(IStringEncryptionService)
         settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password");
    }
    

    https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh#step---3

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    And what's your SMTP code?

    eg:

  • User Avatar
    0
    kapil created

    And what's your SMTP code?

    eg:

  • User Avatar
    0
    kapil created

    it's through 500 error

    What's the error detail?

    System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp
    at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
    at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
    at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result)
    --- End of stack trace from previous location ---
    at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)
    at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
    --- End of stack trace from previous location ---
    at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail)
    at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
    at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml)
    at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash)
    at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash)
    at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input)
    at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
    at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
    at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
    at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
    at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
    at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
    at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
    at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
    at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
    at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
    at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
    at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync()
    at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync()
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.

    • This error usually occurs if your credentials are not true, please check the email address and password that you've provided.

    • As I see you want to use the Gmail SMTP server. If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm this first, if you haven't yet.

    • If you are sure about your email address-password and confirmed the related section in Gmail, can you try to set your password by using the SettingManager's SetGlobalAsync method :

    public override void OnApplicationInitialization(ApplicationInitializationContext context) 
    { 
         var settingManager = context.ServiceProvider.GetService&lt;SettingManager&gt;(); 
         //encrypts the password on set and decrypts on get(IStringEncryptionService) 
         settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); 
    } 
    

    https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh#step---3

    I am not overriding any method,i am using abp inbuilt registration where i got this error on server.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can I check it remotely?

    https://zoom.us/j/94516947934?pwd=bDhCRE9qeDkxcTZ2dWRoN2xxQ2Y3UT09

  • User Avatar
    0
    kapil created

    hi

    Can I check it remotely?

    https://zoom.us/j/94516947934?pwd=bDhCRE9qeDkxcTZ2dWRoN2xxQ2Y3UT09

    yes sure,when?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can join now, and share your screen.

  • User Avatar
    0
    kapil created

    i created new project and publish in IIS but same error is thrown
    Error:-> System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you test the EmailSendDemo console app on your server?

  • User Avatar
    0
    kapil created

    Can you test the EmailSendDemo console app on your server?

    Yes it's work fine.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    i created new project and publish in IIS but same error is thrown

    Are you using a new database?

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19