Activities of "VivekKoppula"

From the commercial login, I created a mvc app as follows(see first 3 images below).

Next I created a database on localdb as shown in 4th image below and updated the connection strings.

Now when I run the app, I get the exception

SqlException: Invalid object name 'AbpLanguages'. Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__169_0(Task<SqlDataReader> result)

The full exception stack is pasted below the images. If you need the full solution as zipped file, let me know how to attach, I will do that. But there is nothing that I had done to it except for the connection strings updation.

So what am I missing?

Exception full Info

SqlException: Invalid object name 'AbpLanguages'. Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__169_0(Task<SqlDataReader> result)

Stack Query Cookies Headers Routing SqlException: Invalid object name 'AbpLanguages'. Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__169_0(Task<SqlDataReader> result) System.Threading.Tasks.ContinuationResultTaskFromResultTask<TAntecedentResult, TResult>.InnerInvoke() System.Threading.Tasks.Task+<>c.<.cctor>b__277_0(object obj) System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, object state) System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, object state) System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref Task currentTaskSlot, Thread threadPoolThread) Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable<T>+AsyncEnumerator.InitializeReaderAsync(DbContext _, bool result, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync<TState, TResult>(TState state, Func<DbContext, TState, CancellationToken, Task<TResult>> operation, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>> verifySucceeded, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable<T>+AsyncEnumerator.MoveNextAsync() Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync<TSource>(IQueryable<TSource> source, CancellationToken cancellationToken) Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync<TSource>(IQueryable<TSource> source, CancellationToken cancellationToken) Volo.Abp.LanguageManagement.EntityFrameworkCore.EfCoreLanguageRepository.GetListByIsEnabledAsync(bool isEnabled, CancellationToken cancellationToken) Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo) Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue<TResult>.ProceedAsync() Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter<TInterceptor>.InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed) Volo.Abp.LanguageManagement.DatabaseLanguageProvider.d2bvcd7xA() Volo.Abp.Caching.DistributedCache<TCacheItem, TCacheKey>.GetOrAddAsync(TCacheKey key, Func<Task<TCacheItem>> factory, Func<DistributedCacheEntryOptions> optionsFactory, Nullable<bool> hideErrors, bool considerUow, CancellationToken token) Volo.Abp.LanguageManagement.DatabaseLanguageProvider.GetLanguagesAsync() Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Show raw exception details Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'AbpLanguages'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Volo.Abp.LanguageManagement.EntityFrameworkCore.EfCoreLanguageRepository.GetListByIsEnabledAsync(Boolean isEnabled, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.LanguageManagement.DatabaseLanguageProvider.d2bvcd7xA() at Volo.Abp.Caching.DistributedCache2.GetOrAddAsync(TCacheKey key, Func1 factory, Func1 optionsFactory, Nullable`1 hideErrors, Boolean considerUow, CancellationToken token) at Volo.Abp.LanguageManagement.DatabaseLanguageProvider.GetLanguagesAsync() at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<

And the headers from the brwser are as follows.

Variable Value Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding gzip, deflate, br Accept-Language en-US,en;q=0.9 Cache-Control no-cache Connection close Host localhost:44375 Pragma no-cache sec-ch-ua " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91" sec-ch-ua-mobile ?0 sec-fetch-dest document sec-fetch-mode navigate sec-fetch-site none sec-fetch-user ?1 upgrade-insecure-requests 1 User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36

Yes, thank you. Thats the problem

I created a new application as per the steps here.

The options choosen during solution creation are as per the images shown in this issue(closed now)

I am not able to successifully login, able to create another admin also and login.

But when it comes to creating a new tenant, the login to the new tenant is always failing.

I tried three times, completely deleting the database and starting fresh everytime.

What am I missing?

Thank You Dave.

When I created a new Tennant I choose Standard Edition(see my first image) and I got into that problem. Then I tried without the 'Standard' edition(chose blank). It worked.

From then on, it started working even with Standard Edition.

I created an multi tenant application as per the options shown here in these images in this issue(closed now).

I created a new entity called Gender as per the steps explained in this section. I

I did not want mult-tenant feature on this, so ensured the multi-tenant check box is NOT Selected.

When I run the appication, every thing is working fine.

The host admin is now able to created objects of Gender.

Now I dont want the tenants to create such objects. I logged in as CompanyA/Admin(tenant - CompanyA) and I am able to create Gender.

I want to restrict this. Tenants should not be allowed to create Gender objects while the host should be allowed. How can I achieve that?

Looking at the code, it appears that this should be something to do with Permissions. But I have no clue what do with this.

public class Genders {
    public const string Default = GroupName + ".Genders";
    public const string Edit = Default + ".Edit";
    public const string Create = Default + ".Create";
    public const string Delete = Default + ".Delete";
}

One way I found is to ensure that the tenant id is null in the GenderAppService class. If the tenant id is not null, then it means that the user is from a tenant. Then in such a case throw some exception. But this is from the developers perspective. Can the end host admin do something himself to impose such a restriction?

Ok, one solution I got is the following.

var genderPermission = myGroup.AddPermission(AbpAppTmpltMvcPvtPermissions.Genders.Default, L("Permission:Genders"), MultiTenancySides.Host);

Added the parameter MultiTenancySides.Host.

That file is AbpAppTmpltMvcPvtPermissionDefinitionProvider from the contract project AbpAppTmpltMvcPvt.Application.Contracts and inside Permissions folder.

I created an asp.net mvc web app using abp suite with the following options.

Template Type: Application Template UI Framework: MVC Database provider: Entity Framework Core Database management system: SQLServer Public web site: Not checked Seperate tenant schema: Not checked Tiered: Not checked

Whenever an exception is thrown, it simply swallows it. Is there any setting that I am missing?

In contrast to this, ealier a few months back, I created an angular app with Abp Community, and whenever the code throws and exception, the UI shows a friendly message.

Is there any setting that I am missing in the asp.net mvc app?

The options choosen when creating asp.net mvc app with Abp suite are as follows.

I tried the abp elsa demo example available at github after following this post.

Things look fine for the coded workflows defined within the workflows folder.

But then I created a simple workflow from the UI as follows. This did not work.

You can create the same workflow by exporting the json(pasted at the end below) file as follows.

After ensuring that it is published, when I run it, it simply shows the elsa workflow page instead of Hello Everyone text reponse.

I tried the same get requst with postman and the result is the same _Host page.

Note that the coded http workflow works fine.

I felt this has got to do with routing, and tried commenting out the following line.

app.UseConfiguredEndpoints(endpoints =>
{
    //endpoints.MapFallbackToPage("/_Host");
});

But this shows 404 not found.

I dont know what to do now. Can you please help me?

You can import the following Json to created the workflow in the ui.

{
  "$id": "1",
  "definitionId": "2d3efd5f41d54f1aafd6772fead4c916",
  "versionId": "73cad85d8a3044ccb21a80d7804c555d",
  "name": "SimpleHelloWorld",
  "displayName": "Simple Hello World",
  "description": "Simple Http workflow created from UI. For a http get request to elsa-hello-world, this returns a simple http text reponse",
  "version": 1,
  "variables": {
	"$id": "2",
	"data": {}
  },
  "customAttributes": {
	"$id": "3",
	"data": {}
  },
  "isSingleton": false,
  "persistenceBehavior": "WorkflowBurst",
  "deleteCompletedInstances": false,
  "isPublished": false,
  "isLatest": true,
  "activities": [
	{
	  "$id": "4",
	  "activityId": "c976ee95-cb57-4fd3-b586-0268cb134025",
	  "type": "HttpEndpoint",
	  "displayName": "HTTP Endpoint",
	  "persistWorkflow": false,
	  "loadWorkflowContext": false,
	  "saveWorkflowContext": false,
	  "persistOutput": false,
	  "properties": [
		{
		  "$id": "5",
		  "name": "Path",
		  "expressions": {
			"$id": "6",
			"Literal": "elsa-hello-world"
		  }
		},
		{
		  "$id": "7",
		  "name": "Methods",
		  "expressions": {
			"$id": "8",
			"Json": "[\"GET\"]"
		  }
		},
		{
		  "$id": "9",
		  "name": "ReadContent",
		  "expressions": {
			"$id": "10"
		  }
		},
		{
		  "$id": "11",
		  "name": "TargetType",
		  "expressions": {
			"$id": "12"
		  }
		}
	  ]
	},
	{
	  "$id": "13",
	  "activityId": "9c9faf81-febb-487b-a3c6-6aa87dc7c197",
	  "type": "WriteHttpResponse",
	  "displayName": "HTTP Response",
	  "persistWorkflow": false,
	  "loadWorkflowContext": false,
	  "saveWorkflowContext": false,
	  "persistOutput": false,
	  "properties": [
		{
		  "$id": "14",
		  "name": "StatusCode",
		  "expressions": {
			"$id": "15"
		  }
		},
		{
		  "$id": "16",
		  "name": "Content",
		  "expressions": {
			"$id": "17",
			"Literal": "Hello Everyone"
		  }
		},
		{
		  "$id": "18",
		  "name": "ContentType",
		  "expressions": {
			"$id": "19"
		  }
		}
	  ]
	}
  ],
  "connections": [
	{
	  "$id": "20",
	  "sourceActivityId": "c976ee95-cb57-4fd3-b586-0268cb134025",
	  "targetActivityId": "9c9faf81-febb-487b-a3c6-6aa87dc7c197",
	  "outcome": "Done"
	}
  ],
  "id": "73cad85d8a3044ccb21a80d7804c555d"
}

This is a follow upto this question

I am trying to add swagger support by doing the following.

  1. Added the following line of code the web module.

    context.Services.AddElsaApiEndpoints(); // The following is throwing exception context.Services.AddElsaSwagger();

But it is throwing exception. The exception is shown below for your reference. So I had to comment out.

  1. Also tried to add the following code in the same ElsaDemoWebModule.cs file.

    app.UseAbpSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "ElsaDemo API"); // The following did not help. options.SwaggerEndpoint("/swagger/v1/swagger.json", "Elsa"); });

But it did help. I get Elsa in the drop down, but selecting it does not give the elsa swagger UI.

The full exception is as follows.

An unhandled exception occurred while processing the request. ArgumentException: An item with the same key has already been added. Key: v1 System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior)

DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions`1[Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions], System.IServiceProvider, Microsoft.AspNetCore.Hosting.IWebHostEnvironment)' on type 'ConfigureSwaggerGeneratorOptions'. Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()

DependencyResolutionException: An exception was thrown while activating Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator -> λ:Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions -> Microsoft.Extensions.Options.OptionsManager1[[Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions, Swashbuckle.AspNetCore.SwaggerGen, Version=6.1.4.0, Culture=neutral, PublicKeyToken=d84d99fb0135530a]] -> Microsoft.Extensions.Options.OptionsFactory1[[Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions, Swashbuckle.AspNetCore.SwaggerGen, Version=6.1.4.0, Culture=neutral, PublicKeyToken=d84d99fb0135530a]] -> λ:Microsoft.Extensions.Options.IConfigureOptions`1[[Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions, Swashbuckle.AspNetCore.SwaggerGen, Version=6.1.4.0, Culture=neutral, PublicKeyToken=d84d99fb0135530a]][] -> Swashbuckle.AspNetCore.SwaggerGen.ConfigureSwaggerGeneratorOptions. Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action<ResolveRequestContext> next)

Hi @EngincanV,

Looks like I am missing something trival here.

Started afresh, I cloned the latest, and then ran the app. Built a new workflow from UI and for the HttpRequest activity, set the end point as

hello-welcome, see the screen shot below. Then navigated to https://localhost:44336/hello-welcome. But its still not working.

But when I navigate to https://localhost:44336/hello-world, it works fine(see the screen shot below). The is due the coded workflow already present and running. But the UI one is not.

Can you please check from your side, and if its working, can you please export the jaso file and attach it along with the project files so that I can download the same to test from my side?

Thank You.

Showing 1 to 10 of 16 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11