How to synchronize SignalR boilerplate notification to windows form? this is my code on the desktop side. I've tried that notification working fine on the web side. Here is my code, can someone help me? I installed the signalR on windows form using NuGet package
public async void createConnection()
{
string link = ConfigurationManager.AppSettings["linkWeb"];
var hubConnection = new HubConnection(link);
hubConnection.TraceLevel = TraceLevels.All;
hubConnection.TraceWriter = Console.Out;
IHubProxy stockTickerHubProxy = hubConnection.CreateHubProxy("abpCommonHub");
stockTickerHubProxy.On("getNotification", stock => show("UserId:" + stock));
await hubConnection.Start();
await stockTickerHubProxy.Invoke("register");
}
public void show(string temp)
{
MessageBox.Show(temp);
}
Hi, I came across to this topic today [http://forum.aspnetboilerplate.com/viewtopic.php?f=2&t=2273])
I also came across the same problem, I need to make a windows form application that could access my previously downloaded module zero template, but it seems I can't find the way to create a login from my windows form. Also I've checked [https://github.com/aspnetboilerplate/as%20...%20AbpWpfDemo]) , but there are no sample on using Identity for login.
Is there any sample code for this?
Hi all, I have this line of validation registered on my localization xml
<text name="Identity.DuplicateName" value="Name {0} is already taken." />
and this is my code for creating a new user
public async Task CreateAsync(CreateGuestInput input)
{
var guest = input.MapTo<Guest>();
CheckErrors(await _GuestManager.CreateAsync(guest));
Logger.Info("Create a Guest with id: " + guest.Id);
}
When creating, it will await The GuestManager
public async Task<IdentityResult> CreateAsync(Guest input)
{
IdentityResult _return= new IdentityResult();
try
{
var temp = _guestRepository.GetAll().Where(i => i.IdentityNumber == input.IdentityNumber).FirstOrDefault();
if (temp == null)
{
await _guestRepository.InsertAsync(input);
_return = IdentityResult.Success;
}
else
{
_return = IdentityResult.Failed("Identity.DuplicateName");
}
}
catch(Exception ex)
{
_return = new IdentityResult(ex.Message);
}
return _return;
}
But I didn't get the Error Message "Name {0} is already taken" but instead i got "An unknown failure has occured.". Can anyone help me with this error handling?
Hi, i'm a newbie with boilerplate, and i need some help. I download the template with module zero and i want to change the default language to Indonesian (id-ID). I added the language source to the database (AbpLanguage) and then I also registered my dictionary to the database (AbpLanguageTexts) and XML file (Core.Localization.Source). Then, I change the default setting on the database from "en" to "id-ID". It works on some browser, some of them still show the default "en" language. In desperation, i remove all others language on the database and finally the localization works on all browser.
In the middle of development, when i have to handle exception using "CheckErrors" method in handling IdentityResult, i found that the localization not working on my exceptionHandling. Instead it returns exception message "[Can not delete admin user]". I also tried to adding "[Can not delete admin user]" as a Key for my Localization dictionary but not working.
While debugging, I experimented a little by re-adding the "en" dictionary to the database. I tried to reproduce the bug, but instead it showing exception message "Can not delete user admin since this is the default admin user" without brackets. Which means, the localization works fine with "en" without we have to describe the key on the database.
My point is how can we configure dictionary for localization for exception handling? Pardon me for the bad English and some technical terms