Hey !
In the case where we can have both logged/Anonymous users and that I want to restrict from external ips;
I think the best way is :
Do you think this is a good idea to create one generic "public" user used by hundred/thousand of person ?
If yes, I see this way
public ActionResult Index()
{
if(...) // check if already logged in, otherwise login as "public user
AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = true }, loginResult.Identity);
return View("~/App/Main/views/index.cshtml");
}
I think many users already discussed about that :) (i also want implement this function on my project)
Maybe have a look on :
Jcachat helped us on this one !
He added the support of Oracle into his nuget. Abp-modulezero fully works now with oracle (EF code first, seed and test website)
<a class="postlink" href="https://github.com/jcachat/EntityFramework.DynamicFilters/issues/40">https://github.com/jcachat/EntityFramew ... /issues/40</a>
Thanks!
I've created an issue on their github to ask them about oracle; we'll see :)
<a class="postlink" href="https://github.com/jcachat/EntityFramework.DynamicFilters/issues/40">https://github.com/jcachat/EntityFramew ... /issues/40</a>
Hello guys,
I saw that a few people here are using oracle as main DB.
Does anyone have successfuly seeded the abp zero project on their Oracle Db ?
If I do this :
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.HasDefaultSchema("TEST");
//base.OnModelCreating(modelBuilder);
My creation& seedare fine. But we miss DynamicFilters And the Web Project says "FilterMustHaveTenant" Not found.
So, we need to include the base.OnModelCreating(modelBuilder);.
When I regenerate the migration file and run update-database -verbose; it creates well tables (not sure that it create annotation stuffs); but the seed does not work. I have
insert into "TEST"."__MigrationHistory"("MigrationId", "ContextKey", "Model", "ProductVersion")
values ('201506040834534_create', 'ModuleZeroSampleProject', model_blob, '6.1.3-40302');
end;
Running Seed method.
System.Data.Entity.Core.EntityCommandCompilationException: An error occurred while preparing the command definition. See the inner exception for details. ---> System.ArgumentException: DbComparisonExpression requires arguments with comparable types.
at System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.CreateComparison(DbExpressionKind kind, DbExpression left, DbExpression right)
at System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Equal(DbExpression left, DbExpression right)
at EntityFramework.DynamicFilters.DynamicFilterQueryVisitor.BuildFilterExpressionWithDynamicFilters(String entityName, IEnumerable`1 filterList, DbExpressionBinding binding, DbExpression predicate)
at EntityFramework.DynamicFilters.DynamicFilterQueryVisitor.Visit(DbScanExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DbScanExpression.Accept[TResultType](DbExpressionVisitor`1 visitor)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.VisitExpression(DbExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.VisitGroupExpressionBinding(DbGroupExpressionBinding binding)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.Visit(DbGroupByExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DbGroupByExpression.Accept[TResultType](DbExpressionVisitor`1 visitor)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.VisitExpression(DbExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.VisitExpressionBinding(DbExpressionBinding binding)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.VisitExpressionBindingEnterScope(DbExpressionBinding binding)
at System.Data.Entity.Core.Common.CommandTrees.DefaultExpressionVisitor.Visit(DbProjectExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression.Accept[TResultType](DbExpressionVisitor`1 visitor)
at EntityFramework.DynamicFilters.DynamicFilterInterceptor.TreeCreated(DbCommandTreeInterceptionContext interceptionContext)
at System.Data.Entity.Infrastructure.Interception.DbCommandTreeDispatcher.<Created>b__0(IDbCommandTreeInterceptor i, DbCommandTreeInterceptionContext c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TInterceptionContext,TResult](TResult result, TInterceptionContext interceptionContext, Action`2 intercept)
at System.Data.Entity.Infrastructure.Interception.DbCommandTreeDispatcher.Created(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree, DbInterceptionContext interceptionContext, IDbDependencyResolver resolver, BridgeDataReaderFactory bridgeDataReaderFactory, ColumnMapFactory columnMapFactory)
--- End of inner exception stack trace ---
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree, DbInterceptionContext interceptionContext, IDbDependencyResolver resolver, BridgeDataReaderFactory bridgeDataReaderFactory, ColumnMapFactory columnMapFactory)
at System.Data.Entity.Core.EntityClient.Internal.EntityProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.CreateCommandDefinition(ObjectContext context, DbQueryCommandTree tree)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable`1 compiledQueryParameters, AliasGenerator aliasGenerator)
at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__6()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult](IEnumerable`1 sequence)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at ModuleZeroSampleProject.Migrations.Data.InitialDataBuilder.CreateUserAndRoles(ModuleZeroSampleProjectDbContext context) in c:\ABPZERO\ORACLE\ModuleZeroSampleProject.EntityFramework\Migrations\Data\InitialDataBuilder.cs:line 27
at ModuleZeroSampleProject.Migrations.Data.InitialDataBuilder.Build(ModuleZeroSampleProjectDbContext context) in c:\ABPZERO\ORACLE\ModuleZeroSampleProject.EntityFramework\Migrations\Data\InitialDataBuilder.cs:line 19
at ModuleZeroSampleProject.Migrations.Configuration.Seed(ModuleZeroSampleProjectDbContext context) in c:\ABPZERO\ORACLE\ModuleZeroSampleProject.EntityFramework\Migrations\Configuration.cs:line 20
at System.Data.Entity.Migrations.DbMigrationsConfiguration`1.OnSeed(DbContext context)
at System.Data.Entity.Migrations.DbMigrator.SeedDatabase()
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.SeedDatabase()
at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.<Update>b__b()
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
An error occurred while preparing the command definition. See the inner exception for details.
PM>
even if my .config have
<edmMappings>
<edmMapping dataType="number">
<add name="bool" precision="1"/>
<add name="byte" precision="3"/>
<add name="int16" precision="5"/>
<add name="int32" precision="10"/>
<add name="int64" precision="19"/>
</edmMapping>
</edmMappings>
</version>
Does anyone have an idea or cant get it run successful on their side ?
(I'm not sure if DynamicFilter annotations stuff are compatible with oracle. But I don't need them)
And not; is there a way to get rid of all DynamicFilter & annotation stuff in abp (creation, seed, & use) ?
Thanks all !
Hello ABP community,
For who it might be interested, i'm using abp & Module Zero with Oracle.
I Had a few trouble since I was using DatabaseFirst before and not CodeFirst Generation.
If you are stuck, there is some tips :
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="TESTWEB" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.25.11)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TEST))) " />
</dataSources>
<edmMappings>
<edmMapping dataType="number">
<add name="bool" precision="1" />
<add name="byte" precision="3" />
<add name="int16" precision="5" />
<add name="int32" precision="10" />
<add name="int64" precision="19" />
</edmMapping>
</edmMappings>
</version>
</oracle.manageddataaccess.client>
With all theses infos, code first works fine with oracle and you can create & seed infos via Module Zero.
Hello hikalkan,
As a current & happy user of ABP(from v0.3) & currently trying Module Zero(with Oracle DB), I saw the new project **ASP.NET Zero**yesterday.
I'm wondering if you could explain briefly to the community what's the future of **_
I've few interrogations :
Thanks for your awesome work !