Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "daws"

Hey :)

Based on the doc <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Authorization">http://www.aspnetboilerplate.com/Pages/ ... horization</a> "AbpAuthorize (AbpMvcAuthorize for MVC Controllers and AbpApiAuthorize for Web API Controllers)"

I would like to restrict my methods from WebAPI Controllers (ApplicationService) to logged users only.

I tried with [AbpApiAuthorize ] but it goes in the method even if not logged. With [AbpAuthorize] the restriction works fine (error user not logged in) and redirect me to the login page (that's normal).

Do I do something wrong with [AbpApiAuthorize] ? i searched on the github repository but there is no code where it's used. (I want to use "AbpApiAuthorize" to get the unAuthorizedRequest>true</unAuthorizedRequest>; & no redirection)

//[AbpApiAuthorize]
[AbpAuthorize]
public List<RiderDto> GetRiders(TimeIntervalDto interval)
{

Thks for your help :)

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.&lt;&gt;c__DisplayClass7.&lt;GetResults&gt;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.&lt;&gt;c__DisplayClass7.&lt;GetResults&gt;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.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.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.&lt;GetElementFunction&gt;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.&lt;&gt;c__DisplayClassc.&lt;Update&gt;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.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;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

&lt;edmMappings&gt;
        &lt;edmMapping dataType=&quot;number&quot;&gt;
          &lt;add name=&quot;bool&quot; precision=&quot;1&quot;/&gt;
          &lt;add name=&quot;byte&quot; precision=&quot;3&quot;/&gt;
          &lt;add name=&quot;int16&quot; precision=&quot;5&quot;/&gt;
          &lt;add name=&quot;int32&quot; precision=&quot;10&quot;/&gt;
          &lt;add name=&quot;int64&quot; precision=&quot;19&quot;/&gt;
        &lt;/edmMapping&gt;
      &lt;/edmMappings&gt;
    &lt;/version&gt;

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 !

Question

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 :

  • nuget package is the official odp.net from oracle : <a class="postlink" href="https://www.nuget.org/packages/Oracle.ManagedDataAccess.EntityFramework/12.1.21">https://www.nuget.org/packages/Oracle.M ... rk/12.1.21</a>
  • you need to delete ALL migrations files from CodeFirst & regenerate only ONE file (via add-migration). The reason is ODP.NET does not manage well dbmigration queries as "alter column" and annotions changes.
  • you need to map column types in your web config, to match .NET type to oracle type : my current mapping is :
<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 **_

  • ABP
  • Module Zero
  • ASP.NET Zero_** I read website & tested ASP.NET Iteration Zero live demo; it sounds promising but since it's the 1st release, it's still a little confuse in my head.

I've few interrogations :

  • for what I understand, ASP.NET Zero is going to be a full project, merging ABP& Module Zero; with all management modules direclty included ?
  • Is **ABP**project (core code) will still live as currently on the github ?
  • what's the future of Module Zero (core code); will it continue independtly like **ABP**project or will it be depending of ASP.NET Iteration Zero ? I think if you can do a short resume of ASP.NET Zero to us, we could have a better understanding to plan our current projects and decide if it could interest us for some future projects :)

Thanks for your awesome work !

Showing 41 to 44 of 44 entries