Hi,
I've an external web client that needs to connect to my aspnetcore server. The problem is that authentication request cames with a plain text format instead of json. The result is an HTTP 415 error.
Is it possible to configure authentication aspboilerplate server to accept plain text format as well ?
Hi,
I'm running my app over Azure. Sometimes, I'm getting a server error popup message when connecting to a tenant or on first host connection. Looking at logs, I've remarked two exceptions that are fired very often (each time server starts at least). Here they are
FATAL 2018-03-26 07:01:03,366 [7 ] soft.AspNetCore.Hosting.Internal.WebHost - Hosting startup assembly exception
System.InvalidOperationException: Startup assembly Microsoft.AspNetCore.AzureAppServices.HostingStartup failed to execute. See the inner exception for more details. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.AzureAppServices.HostingStartup' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
--- End of inner exception stack trace ---
INFO 2018-03-26 07:15:09,011 [14 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HLCISULQQUV1" bad request data: "Invalid request line: '415e-aa28-7c00bb172254\x0D\x0A'"
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Invalid request line: '415e-aa28-7c00bb172254\x0D\x0A'
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.GetUnknownMethod(Byte* data, Int32 length, Int32& methodLength)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.ParseRequestLine(TRequestHandler handler, Byte* data, Int32 length)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.ParseRequestLine(TRequestHandler handler, ReadableBuffer buffer, ReadCursor& consumed, ReadCursor& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame.TakeStartLine(ReadableBuffer buffer, ReadCursor& consumed, ReadCursor& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame.ParseRequest(ReadableBuffer buffer, ReadCursor& consumed, ReadCursor& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
I've googled exception BadHttpRequestException. Both exceptions seems to be linked with System.IO
Do you know how to fix this ?
Hi,
I would like my users to be able to add entities attributes themselves from UI. It's a common scenario for a professional application and I would appreciate your advice to start implementation.
Basicaly, the user should be able to go in some application settings, and add a property name, a property type and a target entity. As a result, when the user will open an entity (let's say a Product entity) then he will have new attributes displayed.
I have two main ideas in mind :
SOLUTION 1 : create a specific entity, let's say AdditionalAttributes (to store property names and types). Then I will add a ICollection<AdditionalAttributes> to a set of existing entities (the ones I want users to be able to extend). I know how to do this in ASPNETZERO context from domain layer to presentation layer. Don't know if this will lead to performance issues or whatever bad.
SOLUTION 2 : adding an XML property to each entities to extend. I don't have much experience on this approach and don't know how to implement this on UI side at least. See here : [https://stackoverflow.com/questions/30783224/dynamically-adding-a-property-to-an-entity-framework-object])
Do you have other solutions in mind ? What's your advice as ASPNETZERO experts ?
Hi,
My app is running on Azure for several month now. I've an Azure Standard subscription (S1) : CPU usage is about 2/3% and Memory usage arround 45%. When trying to chat to an other user, the message sent takes some seconds to be displayed in the chat list (4s to 10s sometimes) Also, when pressing Enter key, the chat message remains in the input field before being displayed in the chat list. In some cases, one message sent can be displayed twice (??)
This behavior is very frustrating when trying to chat with an other user.
Do you have an idea how to improve this ?
Hi,
My application is down since yesterday. Application is deployed in an Azure App Service since december 2017. I never had a problem with it ; everything was working well since yesterday.
Today, my customers can't connect to the app with error IIS 502.5.
Host is not able to start.
I have following error in azure log : Application 'MACHINE/WEBROOT/APPHOST/NAME-APP' with physical root 'D:\home\site\wwwroot' failed to start process with commandline 'D:\home\site\wwwroot\ELEVEN_SOFT.NAME.Web.Host.exe ', ErrorCode = '0x80004005 : e0434352.
And on latest application log, I found following exception ; this exception points out that a file is not found but it is present in file system (no change has been done) it also mentioned an error on startup.cs line 141 which is code line
await next();
I googled these errors and it could be link with a .NETCORE version issue on server... but I didn't change anything on Azure portal.
Can you please help me to solve this ?
ERROR 2018-01-30 14:24:14,807 [7 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HLB7J78B0JHR", Request id "0HLB7J78B0JHR:00000005": An unhandled exception was thrown by the application. System.IO.FileNotFoundException: Could not find file: /Common/Images/logo.png File name: '/Common/Images/logo.png' at Microsoft.AspNetCore.Mvc.Internal.VirtualFileResultExecutor.ExecuteAsync(ActionContext context, VirtualFileResult result) at Microsoft.AspNetCore.Mvc.VirtualFileResult.ExecuteResultAsync(ActionContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeResultAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResultFilterAsync>d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<<AdaptWebSockets>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.<Invoke>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ELEVEN_SOFT.Logisav.Web.Startup.Startup.<>c.<<Configure>b__4_1>d.MoveNext() in C:\Users\ricar\source\repos\Logisav_AspnetZero\aspnet-core\src\ELEVEN_SOFT.Logisav.Web.Host\Startup\Startup.cs:line 141 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.
Hi,
I would like to switch current metronic 5 theme (default) to demo 6 available here : [https://keenthemes.com/metronic/preview/?demo=demo6])
Do I need to recompile the entire theme to do it (I don't see the "tools" folder to do that like it is mentioned in metronic documentation) ? Or just by changing a setting ?
If I'm not wrong, the entire look & feel of current theme is located in folder : src\assets\metronic\dist\html\default\assets\demo\default\base with following files
scripts.bundle.js style.bundle.css
Do you confirm ?
Hi,
In my current project, my customer asked me to restrict access to an entity (let's call this entity "People") according to the user currently logged. The goal is to hide some people entities according to the user. A people entity can be visible for more than one user. Therefore, the relationship between people and user is a many-to-many.
I plan to :
Then, I just need to adapt my app service query to retrieve a list of people that is visible for the current user.
Do you have any advice to do this in a better way ?
I had a look to dynamic filters but don't know if this could help as the relationship between people and user is a many-to-many.
Sometimes, I have following error on my website deployed on Azure (ASP.NET + ANGULAR) :
ERROR 2018-01-15 07:48:44,446 [47 ] Mvc.ExceptionHandling.AbpExceptionFilter - An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy.
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. ---> System.Data.SqlClient.SqlException: The client was unable to establish a connection because of an error during connection initialization process before login. Possible causes include the following: the client tried to connect to an unsupported version of SQL Server; the server was too busy to accept new connections; or there was a resource limitation (insufficient memory or maximum allowed connections) on the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) ---> System.ComponentModel.Win32Exception: An existing connection was forcibly closed by the remote host
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.<>c__DisplayClass18_0.<BeginTransaction>b__0(DatabaseFacade database)
at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.<>c__DisplayClass12_0`2.<Execute>b__0(DbContext c, TState s)
at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
--- End of inner exception stack trace ---
Do you already had this kind of errors ? Any idea on your side ?
Hi,
I don't understand how logo image are being managed when an email is sent from application (let's say a subscription email). See attached screenshot. If I browse directly to TenantCustomization/GetTenantLogo of my website, nothing is shown.
Hi,
I'm getting an AbpExceptionFilter error with following query. This query allows to get users in OU.
//Find users in OU
var query = (from u in UserManager.Users
join ou in _userOrganizationUnitRepository.GetAll()
on u.Id equals ou.UserId
select u).Distinct().WhereIf(
!input.Filter.IsNullOrWhiteSpace(),
u =>
u.Name.Contains(input.Filter) ||
u.Surname.Contains(input.Filter) ||
u.UserName.Contains(input.Filter) ||
u.EmailAddress.Contains(input.Filter)
);
//Workarround to avaid abpdatafilterexception when counting query > Performance impact by calling ToListAsync !
var count = (await query.ToListAsync()).Count;
As you can see, a distinct keywork is added to avoid duplicated users (as a user can be on multiple OU)
If I remove Distinct keyword from the query, I have no more exception.
Any idea how to avoid this exception ?