I have two applications called DinePlan and DineConnect
DINEPLAN - AN WPF APPLICATION RUNS ON THE CLIENT SIDE.
DINECONNECT - ASP.NET ZERO APPLICATION HOSTED ON THE SERVER
I want to transmit DATA FROM DINEPLAN to DINECONNECT. Currently, I am communicating via DINECONNECT API in a BACKGROUND THREAD.
At a TIME, there are more than 100 DINEPLAN will be communicating via DINECONNECT. When there is no internet, i am missing the details from DINEPLAN to DINECONNECT and i have to re-initiate again and it is pain.
I would like to SIMPLIFY via a MESSAGE BROKER.
How we can get use of DOTNETMQ ?
Hope this is clear.
How easy to change it ?
Thanks
I am understood Correct, I have to call the URL (WHICH HAS THE MVC CONTROLLER), the Controller should send the notification to all the registered subscriber.
The Subscriber should check whether the Client is Online. if it is online, it should give the popup.
Is that correct ?
Could you please update me ?
It's urgent Please
Yes I have done that... Still same
Sorry to bother you Ismail
I have the same issue
My DB datatype is numeric(18,6) but when I am storing more than 2 digits. It is always getting stored only 2 digits
Plesase check it from your end
This is going to be massive blocker for us
Please help us to solve this
Thanks Sir
Is it possible to give me a quick example ?
Much Appreciated..
I have done both but it is not working.
I have attached my code here..
vm.importAll = function () {
abp.message.confirm(app.localize('ImportWarning'),
function (isConfirmed) {
if (isConfirmed) {
abp.ui.block();
setupService.seedSampleCompany().success(function() {
abp.notify.success(app.localize('Organization') + ' ' + app.localize('SuccessfullyImported'));
setupService.seedSampleMenu().success(function() {
abp.notify.success(app.localize('Menu') + ' ' + app.localize('SuccessfullyImported'));
setupService.seedSampleCustomer().success(function() {
abp.notify.success(app.localize('Customer') + ' ' + app.localize('SuccessfullyImported'));
}).finally(function() {});
setupService.seedSampleSupplier().success(function() {
abp.notify.success(app.localize('Supplier') + ' ' + app.localize('SuccessfullyImported'));
}).finally(function() {
setupService.seedSampleMaterial().success(function() {
abp.notify.success(app.localize('Material') + ' ' + app.localize('SuccessfullyImported'));
});
});
setupService.seedSampleTax().success(function() {
abp.notify.success(app.localize('Tax') + ' ' + app.localize('SuccessfullyImported'));
}).finally(function() {});
});
});
abp.ui.unblock();
}
});
}
My Page has already have got two files that you have mentioned.
Here is the Code
using System;
using System.Threading.Tasks;
using System.Web.Http;
using Abp.Authorization.Users;
using Abp.UI;
using Abp.Web.Models;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.OAuth;
using DinePlan.DineConnect.Authorization;
using DinePlan.DineConnect.Authorization.Roles;
using DinePlan.DineConnect.Authorization.Users;
using DinePlan.DineConnect.MultiTenancy;
using DinePlan.DineConnect.WebApi.Models;
namespace DinePlan.DineConnect.WebApi.Controllers
{
public class TryController : DineConnectApiControllerBase
{
public static OAuthBearerAuthenticationOptions OAuthBearerOptions { get; set; }
private readonly UserManager _userManager;
private readonly AbpLoginResultTypeHelper _abpLoginResultTypeHelper;
static TryController()
{
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
}
public TryController(
UserManager userManager,
AbpLoginResultTypeHelper abpLoginResultTypeHelper)
{
_userManager = userManager;
_abpLoginResultTypeHelper = abpLoginResultTypeHelper;
}
[HttpPost]
public async Task<AjaxResponse> Hello()
{
var loginResult = await GetLoginResultAsync(
DEFAULT_USER,
DEFAULT_PASSWORD,
DEFAULT_TENANCY
);
var ticket = new AuthenticationTicket(loginResult.Identity, new AuthenticationProperties());
var currentUtc = new SystemClock().UtcNow;
ticket.Properties.IssuedUtc = currentUtc;
ticket.Properties.ExpiresUtc = currentUtc.Add(TimeSpan.FromMinutes(30));
return new AjaxResponse(OAuthBearerOptions.AccessTokenFormat.Protect(ticket));
}
public string DEFAULT_USER => "admin";
public string DEFAULT_PASSWORD => "123qwe";
public string DEFAULT_TENANCY => "Connect";
private async Task<AbpUserManager<Tenant, Role, User>.AbpLoginResult> GetLoginResultAsync(string usernameOrEmailAddress, string password, string tenancyName)
{
var loginResult = await _userManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);
switch (loginResult.Result)
{
case AbpLoginResultType.Success:
return loginResult;
default:
throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);
}
}
protected virtual void CheckModelState()
{
if (!ModelState.IsValid)
{
throw new UserFriendlyException("Invalid request!");
}
}
}
}