Base solution for your next web application

Activities of "omital"

Hi. You can download aspnetboilerplate-dev source and then project "Abp.Web.Api" is a good sample for your purpose.

Hi @ismcagdas I implement it manually by my own way like this:

public class LIMSEmailSender : ILIMSEmailSender
    {

        private readonly SenderEmailConfig _senderEmailConfig;

        public LIMSEmailSender(SenderEmailConfig senderEmailConfig)
        {
            _senderEmailConfig = senderEmailConfig;
        }

        public void SendEmail(string to, string subject, string body)
        {
            MailMessage mail = new MailMessage();
            SmtpClient SmtpServer = new SmtpClient(_senderEmailConfig.SmtpClient);
            mail.From = new MailAddress(_senderEmailConfig.EmailAddress);
            mail.To.Add(to);
            mail.Subject = subject;
            mail.Body = body;
            mail.IsBodyHtml = true;

            SmtpServer.Port = _senderEmailConfig.SmtpPort;
            SmtpServer.Credentials = new System.Net.NetworkCredential(_senderEmailConfig.EmailAddress, _senderEmailConfig.Password);
            SmtpServer.EnableSsl = _senderEmailConfig.EnableSSL;
            SmtpServer.Send(mail);
        }
    }

and SenderEmailConfig implementation:

public class SenderEmailConfig : ISingletonDependency
    {
        public string EmailAddress { get; set; }
        public string Password { get; set; }
        public string SmtpClient { get; set; }
        public bool EnableSSL { get; set; }
        public int SmtpPort { get; set; }
    }

and initial SenderEmailConfig in web module's PreInitialize method like this

var limsEmail = IocManager.Resolve<SenderEmailConfig>();
            limsEmail.EmailAddress= System.Configuration.ConfigurationManager.AppSettings["email"];
            limsEmail.EnableSSL = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["enableSSL"]);
            limsEmail.Password = System.Configuration.ConfigurationManager.AppSettings["emailPassword"];
            limsEmail.SmtpClient = System.Configuration.ConfigurationManager.AppSettings["smtpClient"];
            limsEmail.SmtpPort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["smtpPort"]);

and finally I love This Framework

How can I localize message related to asp.Identity for example [Identity.Invalid User Name]?

Finally I found the solution. After update column abpUsers.SecurityStamp is null. I initial it with value like aaa97766-3203-1461-7a95-3ada31458999. Done.

Hi, I recently update from abp version 0.12.0.2 to 1.4.1.0. In login action in account controller I got error in this line of code:

var loginResult = await _logInManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);

error description is

Azma.Web.Controllers.AccountController   - Value cannot be null.
Parameter name: value
System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at System.Security.Claims.Claim..ctor(String type, String value, String valueType, String issuer, String originalIssuer, ClaimsIdentity subject, String propertyKey, String propertyValue)
   at System.Security.Claims.Claim..ctor(String type, String value)
   at Microsoft.AspNet.Identity.ClaimsIdentityFactory`2.&lt;CreateAsync&gt;d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Authorization.Users.AbpUserManager`2.<CreateIdentityAsync>d__40.MoveNext() in D:\Halil\Github\module-zero\src\Abp.Zero\Authorization\Users\AbpUserManager.cs:line 323
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Authorization.AbpLogInManager`3.&lt;CreateLoginResultAsync&gt;d__36.MoveNext() in D:\Halil\Github\module-zero\src\Abp.Zero\Authorization\AbpLoginManager.cs:line 216
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Abp.Authorization.AbpLogInManager`3.<LoginAsyncInternal>d__35.MoveNext() in D:\Halil\Github\module-zero\src\Abp.Zero\Authorization\AbpLoginManager.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Authorization.AbpLogInManager`3.&lt;LoginAsync&gt;d__34.MoveNext() in D:\Halil\Github\module-zero\src\Abp.Zero\Authorization\AbpLoginManager.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Threading.InternalAsyncHelper.&lt;AwaitTaskWithPostActionAndFinallyAndGetResult&gt;d__5`1.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 120
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Azma.Web.Controllers.AccountController.&lt;GetLoginResultAsync&gt;d__17.MoveNext() in D:\Projects\Web\AzmaN\Azma.Web\Controllers\AccountController.cs:line 218
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Azma.Web.Controllers.AccountController.<Login>d__14.MoveNext() in D:\Projects\Web\AzmaN\Azma.Web\Controllers\AccountController.cs:line 140
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)

Hi, Did any documentation about ISmtpEmailSender?

Hi, How can I retrieve all userIds that have specific permisstion? for example all userids that have permission 'BaseTable.Acc.Bank.Edit'.

Hi, How can I minify file created by AbpServiceProxies/GetAll ?

Hi, How can I implement chat system with abp? Should I implement it with Concepts like [http://www.aspnetboilerplate.com/Pages/Documents/Notification-System]) or [http://www.aspnetboilerplate.com/Pages/Documents/SignalR-Integration])?

Can I access web.config's configuration value in app project?

Showing 11 to 20 of 99 entries