Base solution for your next web application

Activities of "daws"

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 !

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 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 !

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 :)

Hey ! :)

I've a question about a specific architecture. I have to add 2 new features :

  • <ins>Memory cache accessible by WebAPI AND filled by a network connection</ins>

My goal is to have WebAPIs to retrieve DB stuff (already done) AND WebAPIs to retrieve infos from a realtime cache. I will NOT use SignalR for this part (for performance reason, i'll call webapi once each 5 minutes instead of receiving signalR datas each second) My realtime is delayed with 5-10 minutes, so it's not a problem.

This cache is not coming from DB but from a memory cache (list object) which is filled each second by a tcp stream.

Knowing that WebAPI IIS are initialized when called, i can't run a tcp service on IIS.

  • <ins>SignalR</ins>

I just need to create an windows service for that. (like you explained on <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/174">https://github.com/aspnetboilerplate/as ... issues/174</a> )

I see multiple solutions here for the memory cache :

  • <ins>Encapsulate my tcp service & WebAPIs TCP in a windows service.</ins>I create a separated windows service which SELF HOST webAPIs TCP and signalR In this way [list:i7cspscg] [*:i7cspscg]Current project (WebAPIs DB & Web) still works in the same process ISS
  • WebAPIs TCP are SELF HOSTED in a windows service & contains SignalR Hub also.

[/:m:i7cspscg] [:i7cspscg]<ins>Split the current project (WebAPI & Web) into 2 distinct process.</ins>

  • Web Project on IIS
  • ALL WebAPI (ABP DB & TCP) on a SELF HOSTED service. (with SignalR also)[/*:m:i7cspscg][/list:o:i7cspscg]
  • What do you think is the best solution ? (or another one ?)
  • [AbpAuthorize] is still going to work if webAPI is hosted on a different thread ? (Windows service vs Web IIS project)
  • To use ABPScripts WebAPI from different windows services (ports), do I simply include <script src="~/AbpScripts/GetScripts"> with the url & port from the specific service ?

Thks for your help !

Question

Hi there !

Related to SettingsDefinition; is it possible to add a custom field/column for settings ? (name, value, sortOrder) for example.

and last, I see the SettingDefinitionGroup code, to group settings by kind for the UI. Is it going to be developed/documented ? :)

related to this document line : "Group: Can be used to group settings. This is just for UI, not used in setting management."

Thks for your help !

Hi there !

My Website is accessible for public and registered users.

Even if there is no critical data, I would like that only users using ABP Website (public & registered) could access the WebAPI. The main reason is that I don't want that another concurrent could use my WebAPI calls.

The public user is not logged in, so i cannot use AbpAuthorize property because it does not have a token. So ... it's impossible.

My workaround idea is that each "non-registered user" should be logged as user named "public".

But in this way, I have to avoid settings changes / audit / etc for this specific user.

Is it a good idea for this workaround or you do have a better one ?

Thks !

Hi there,

for ICreationAudited, it creates "CreationTime" with DateTime type.

Is there any plan to convert theses interfaces to DateTimeOffset ? since my app will be deployed on serveral timezones it could be good to manage time data from one database to another one.

note : maybe related <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/40">https://github.com/aspnetboilerplate/as ... /issues/40</a>

Hello there !

My current project was developped with the default aspnet abp Template. I've successfully converterted all my projects to match the aspnetzero Template, except for the web project.

In ASP ABP (public Template), all scripts (like jQuery) are in /Scripts, and managed by nuget packages. In ASPNETZERO, it's located in /libs/ and do not use nuget packages.

Related to these infos :

  • how do you easily update aspnetzero Template on latest nuget (jQuery & other stuff); or do you replace all files by hand ? (I see that some js files libs are not the latest version)
  • is it best to get rid of theses nuget (js lib) to match the aspnetzero Template ?

I can understand that it's for compatibility/stability reason (to avoid update if there is some breaking changes), but i thought that jQuery based on nuget package was easier to update.

thks for your thoughts !

Hi !

Is there any way to get the information if a user is logged in, in javascript without using "abp.services.app.session.getCurrentLoginInformations" ?

I would like to get the same top/right user section from Dashboard, on another SPA which could be accessible for public & authenticated user.

if not logged in, i'll include "login" link. if logged in, i'll display the menu.

in aspnetzero, this module in home page is from a mvc view with @model; i try to avoid the model, since my home controller return directly an angular page and not an mvc view, so i can't have the model with infos.

thks !

Showing 1 to 10 of 43 entries