Aktivity „kapil“

Odpoveď

hi

Can you remove the space from the username?

https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.useroptions.allowedusernamecharacters?view=aspnetcore-6.0

but in "cn" attribue have space how i can remove.

Odpoveď

hi

See https://docs.abp.io/en/commercial/latest/modules/account/ldap#customize-built-in-services

yes, i do same but this error is thrown.

i dont have "uid" attribute becaue is null i am using "cn" attribue which give this error.

You can add a MyEmailSender service, then copy the code from the EmailSendDemo to send the mail.

context.Services.Replace(ServiceDescriptor.Transient<IEmailSender, MyEmailSender>()); 

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/NullEmailSender.cs#L13

Ok thanks sir It's working fine. Thanks for support.

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

Are you using a new database?

yes sir

Can you test the EmailSendDemo console app on your server?

Yes it's work fine.

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

hi

Can I check it remotely?

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

yes sure,when?

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.

And what's your SMTP code?

eg:

hi

Can you try to disable ssl?

And what's your stmp code?

i already try that,but same error is thrown

Zobrazených 31 až 40 z 48 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11