Hi. Any other solution for this kind of problem?
Yes. I use app service from windows desktop app directly. Is it correct way? if yes, how windows app can know about actual error occurred in service?
any solution?!
Hi
For the first option, You can handle AbpRemoteCallException and catch the excpetion.
I call method like this
try
{
return await _abpWebApiClient.PostAsync<GetInstanceInfoByCodeOutput>(BaseUrl + "api/services/isirids/dashboard/GetInstanceInfoByCode", input);
}
catch (AbpRemoteCallException ex)
{
throw new Exception(ex.Message);
}
for every exception raised from server I got this
Could not made request to http://localhost/ISD.Web//api/services/isirids/dashboard/GetInstanceInfoByCode! StatusCode: InternalServerError, ReasonPhrase: Internal Server Error
AND for secend way, Please example?! :shock:
found. When setting value is equal to default value (initialized in SettingProvider) abp delete related row from abpSettings entity. I think this is a bad thing?! suppose that user set setting value to default value , related row will be deleted from abpSettings entity, now we release new version and seed method execute . the final conclusion is that "<ins>Seed method create new row in AbpSettings that maybe have a diffrente value compare with those user value</ins>" .
Anybody?
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
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, Did any documentation about ISmtpEmailSender?