Hi,
I am using the Abp Web Api in an external app. When authenticating, using the 'Authenticate' request, I recieve the same response regardless as to whether the ShouldChangePasswordOnNextLogin flag is set.
Is there an easy way to determine, at login, whether this flag is set?
Also, could you give me some guidance as to how I would change the user password using the Web api.
Many thanks
Hi,
I am trying to view the Swagger UI and am getting a 500 error. Please could you give me some guidance as to how I can debug this issue.
I have not changed the cofiguration from the default:
private void ConfigureSwaggerUi() { Configuration.Modules.AbpWebApi().HttpConfiguration .EnableSwagger(c => { c.SingleApiVersion("v1", "ippex.IppexCloud.WebApi"); c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First()); }) .EnableSwaggerUi(c => { c.InjectJavaScript(Assembly.GetAssembly(typeof(IppexCloudWebApiModule)), "ippex.IppexCloud.WebApi.Scripts.Swagger-Custom.js"); }); }
I am using ABP v3.8.3 and Aspnet Zero v4 with MVC/Jquery
Many thanks
LocalizationHelper is an Abp class:
Abp.Localization.LocalizationHelper
I am wondering if the language used by LocalizationHelper gets set when I initialize the AbpBootstrapper.
If this is the case, how can I programmatically change this language setting?
If I can do this, then I won't need to pass in the culture info to get the correct string (this would be ok, as each invocation of an Azure Funtion runs its own thread)
I am running this code within the context of an Azure Function, so do not have access to anything MVC related.
Do you have any idea as to why LocalizationHelper is not working as described?
You say that it is not recommended to use IocManager.Instance(). Could you explain why this is please?
Many thanks.
Hi,
Yes, it is being executed.
I have since found, that if I use an instance of LocalizationManager rather than the static LocalizationHelper method, I do get the correct localized string back.
I would, however, appreciate a solution for LocalizationHelper, as using an instance will cause me much refactoring.
Many thanks
Hi,
I have a requirement to get localized strings on specific languages. In my MVC application, this is achieved successfully by using the following:
var cultureInfo = new CultureInfo(languageName, true);
var str = LocalizationHelper.GetString(IppexCloudConsts.LocalizationSourceName, "AboutUs", cultureInfo);
I now have the same requirment within an Azure Function. I have set this up to run ABP. However, the code above now simply returns the label rather than the localized string. Without the culture info parameter, I am still getting localized values (using the default culture within which the function is running).
ABP is bootstrapped into the function using the following code:
public static class Bootstrapper
{
private static bool IsStarted = false;
private static readonly object _syncLock = new object();
public static AbpBootstrapper AbpBootstrapper { get; private set; }
public static void Startup()
{
if (!IsStarted)
{
lock (_syncLock)
{
if (!IsStarted)
{
var bootstrapper = AbpBootstrapper.Create<IppexCloudAzureFunctionsModule>();
bootstrapper.Initialize();
AbpBootstrapper = bootstrapper;
IsStarted = true;
}
}
}
}
}
My module code is as follows:
[DependsOn(typeof(IppexCloudDataModule), typeof(IppexCloudUploadApplicationModule), typeof(IppexCloudAzureFileStorageModule))]
public class IppexCloudAzureFunctionsModule : AbpModule
{
public override void PreInitialize()
{
Database.SetInitializer<IppexCloudDbContext>(null);
}
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
}
Thank you. That solved it...
Hi,
Sorry, should have mentioned, I am using MVC, jQuery version (Abp v3.8.3)
Hi,
We have a requirement to use email address as User Name.
However, the User Name seems to be restricted to alpha numeric characters only, hence preventing email addresses containing hyphens.
What is the reason for this? Is it possible to override this restriction?
Many thanks.