Base solution for your next web application

Activities of "tteoh"

Question

Hi Support,

Please advice if I should upgrade TypeScript whenever prompted the message by Visual Studio:

Your project uses a version of TypeScript older than the version currently installed with Visual Studio. You may get errors if you try to build your project. Would you like us to upgrade the TypeScriptToolsVersion in your project file so you don't see this warning again?

Thanks. /Tommy

Dear Support,

With the minimal documentation provided online AspnetZero Migrator tool, I have managed to:

  1. Locate the App.config and updated correctly
  2. Locate the exe in "..\Tools\MyApp.Migrator\bin\Debug

However, when I run the tool directly in the Debug folder, I encountered the following error:

2017-06-01 09:41:17 | HOST database migration started...
2017-06-01 09:41:17 | An error occured during migration of host database:
2017-06-01 09:41:17 | Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate OUD.EntityFramework.OUDDbContext ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Keyword not supported: 'thinkpad-x250; database'.
   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<SetConnectionString>b__18(DbConnection t, DbConnectionPropertyInterceptionContext`1 c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.SetConnectionString(DbConnection connection, DbConnectionPropertyInterceptionContext`1 interceptionContext)
   at System.Data.Entity.Infrastructure.SqlConnectionFactory.CreateConnection(String nameOrConnectionString)
   at System.Data.Entity.Internal.LazyInternalConnection.Initialize()
   at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName()
   at System.Data.Entity.Internal.LazyInternalContext.get_ProviderName()
   at System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
   at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
   at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
   at Abp.EntityFramework.AbpDbContext.RegisterToChanges() in D:\Github\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 141
   at Abp.Zero.EntityFramework.AbpZeroDbContext`3..ctor(String nameOrConnectionString) in D:\Github\module-zero\src\Abp.Zero.EntityFramework\Zero\EntityFramework\AbpZeroDbContext.cs:line 66
   at OUD.EntityFramework.OUDDbContext..ctor(String nameOrConnectionString) in C:\Users\Admin\Source\Workspaces\OUD\OUD\OUD.EntityFramework\EntityFramework\OUDDbContext.cs:line 87
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, ConstructorCandidate constructor)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   --- End of inner exception stack trace ---
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
   at Castle.Windsor.WindsorContainer.Resolve[T](Object argumentsAsAnonymousType)
   at Abp.Dependency.IocManager.Resolve[T](Object argumentsAsAnonymousType) in D:\Github\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 184
   at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Object argumentsAsAnonymousType) in D:\Github\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 53
   at Abp.Zero.EntityFramework.AbpZeroDbMigrator`2.CreateOrMigrate(AbpTenantBase tenant) in D:\Github\module-zero\src\Abp.Zero.EntityFramework\Zero\EntityFramework\AbpZeroDbMigrator.cs:line 61
   at Abp.Zero.EntityFramework.AbpZeroDbMigrator`2.CreateOrMigrateForHost() in D:\Github\module-zero\src\Abp.Zero.EntityFramework\Zero\EntityFramework\AbpZeroDbMigrator.cs:line 32
   at OUD.Migrator.MultiTenantMigrateExecuter.Run(Boolean skipConnVerification) in C:\Users\Admin\Source\Workspaces\OUD\OUD\Tools\OUD.Migrator\MultiTenantMigrateExecuter.cs:line 60
2017-06-01 09:41:17 | Canceled migrations.

Further questions:

  1. Could you please provide more details on this amazing tool that is supposed to ease Staging and Production deployment?
  2. Am I right to assume that if I run Migrator on empty database for the first time, it behaves as intialisation
  3. After making changes to existing model, and rerun the newly compiled Migrator.exe, it will only perform "database update"?

Thanks. /Tommy

Dear Support,

Current Behavior: Whenever user select a language other than current application/tenant default language, an entry "Abp.Localization.DefaultLanguageName" will be added to AbpSettings table for the specified user.

Conversely, whenever user selec the same language as current application/tenant default language, the specified user entry will be removed.

There is an open issue in github on "user language determination" for AspNet Core but the same issue is encountered for AspNet as well: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2103#thread-subscription-status">https://github.com/aspnetboilerplate/as ... ion-status</a>

Q1: Will the fix apply include AspNet? Q2: If Yes, when? Q3: Possible to release a patch as I need it for current project?

Thanks, /Tommy

Question

Dear Support,

Reference-> <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Mvc-Angularjs#multi-tenancy">https://www.aspnetzero.com/Documents/De ... ti-tenancy</a> It states Multi-tenancy can be disabled to become a single tenant application. Therefore, hiding away all multi-tenancy related functionalities. However, there will be still be a signle tenant created named "Default".

Reference-> <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Mvc-Angularjs#login">https://www.aspnetzero.com/Documents/De ... arjs#login</a> With single tenancy, the input for Tenancy Name will be hidden away. The login is always using "Default" tenancy.

:idea: Questions:

  1. With single tenancy, is still important to configure any setting (AbpSettings) at Host level?
  2. If yes, how to login as Host admin? Part of database initialisation, two Admin user accounts were created, one without TenantId (Host) and the other TenantId = 1 (Default)

:!: Clarifications: I would like to clarify when configuring AspNet Zero setting (AbpSettings), how the settings are classified as host-relevant or tenant-relevant.

For example, i realise the SMTP configuration is saved at host level in AbpSettings table with TenantId = NULL whereas TIMING is saved witn TenantId = 1.

:idea: Assumptions: Am i right to assume that for single tenant implemenation, Admin login to Default tenant is as equivalent of Login as Host to perform host-relevant settings.

Regards, /Tommy

Hi support,

There was a feature request in github on the above: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/50">https://github.com/aspnetboilerplate/as ... /issues/50</a>

Would like to confirm this is still not implemented ABP framework?

Is there a plan to do so?

I m trying to disgest the opinions expressed but as I am still new to Abp and EF, appreciate a more descriptive advice and guidance to implement it using asp.net zero template (MVC+AJS).

The use case is to generate an Order Number during order creation with prefix. I.e. ORD0003

Thanks /tommy

Dear Support,

The standard default.html for constructing user account acivation email uses "absolute path" to logo image (which is currently set to <a class="postlink" href="http://aspnetzero.com/Images/Logos/logo.png">http://aspnetzero.com/Images/Logos/logo.png</a>).

I had tried to use "relative path" but i didn't work.

Please kindly advice.

Thanks. /Tommy

Dear Support,

I am using project template (MVC5 + AJ1), would like to know how best method to implement content (widget) authorisation for the standard Dashboard based on role defined.

Thanks. /Tommy

Dear Support,

What's the best way to control a single user can only log in a single session at any given time?

[Use Case]

  1. The same user login is used on Chrome and Chrome Incognito are considered two separate session on the same device.
  2. The same user login is used on different browsers on different devices

[Requirements]

  • To detect the user login already has an active session
  • Automatically logout the 1st Session while allowing the 2nd Session to be established

Thanks. /Tommy

Dear Support,

Currently, there is a duplicate email check when creating a new User Account. Is there a setting to disable the duplicate check or what should I do to disable such feature?

Thanks.

Regards, /Tommy

Showing 31 to 39 of 39 entries