Base solution for your next web application

Activities of "Simonlum"

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? V8.7
  • What is your product type (Angular or MVC)? ANGULAR
  • What is product framework type (.net framework or .net core)? .NET CORE

Hi Team My project was running well a few days ago,but today an error came up

![image.png](/QA/files/9b24c68c2d05d8aa5d3239fc0a7f8d59.png)

Hi, I have a stored procedure and return a dataset, so how can i receive the dataset in AspNetZero Project,Could you please give me some examples; thanks;

Hi team,

I want to use store procedure in my project. and i followed the tutorial step by step: https://aspnetboilerplate.com/Pages/Documents/Articles/Using-Stored-Procedures,-User-Defined-Functions-and-Views/index.html.

when i run my project and i get the error:

InvalidOperationException: The connection does not support MultipleActiveResultSets. STACK TRACE: at Microsoft.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) at Microsoft.Data.SqlClient.SqlInternalTransaction.Rollback() at Microsoft.Data.SqlClient.SqlTransaction.Dispose(Boolean disposing) at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Dispose() at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.Dispose(IIocResolver iocResolver) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.DisposeUow() at Abp.Domain.Uow.UnitOfWorkBase.Dispose() at Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

So i tried to set MultipleActiveResultSets=true in the connection string and i get another error:

SqlException: The transaction operation cannot be performed because there are pending requests working on this transaction. STACK TRACE: at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at Microsoft.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest) at Microsoft.Data.SqlClient.SqlInternalTransaction.Commit() at Microsoft.Data.SqlClient.SqlTransaction.Commit() at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit() at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.Commit() at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.CommitTransaction() at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.CompleteUowAsync() at Abp.Domain.Uow.UnitOfWorkBase.CompleteAsync() at Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted

below is my code:

public class DashboardRepository : DynasysSolutionRepositoryBase<Company, long>, IDashboardRepository { private readonly IActiveTransactionProvider _transactionProvider; public DashboardRepository(IDbContextProvider<DynasysSolutionDbContext> dbContextProvider, IActiveTransactionProvider transactionProvider) : base(dbContextProvider) { _transactionProvider = transactionProvider; }

    public async Task&lt;List&lt;GetSupplierStatusOutput&gt;> GetSupplierStatus(int tenantId)
    {

        EnsureConnectionOpen();
        using (var command = CreateCommand("Exec SP_GetSupplierStatisticByStatus @tenantId", CommandType.StoredProcedure, new SqlParameter("@tenantId", tenantId)))
        {
            using (var dataReader = await command.ExecuteReaderAsync())
            {
                List&lt;GetSupplierStatusOutput&gt; list = new List&lt;GetSupplierStatusOutput&gt;();

                while (dataReader.Read())
                {
                    list.Add(new GetSupplierStatusOutput()
                    {
                        Name = dataReader["Status"].ToString(),
                        Count = Convert.ToInt32(dataReader["NumsOfSupplier"])
                    });
                }
                return list;
            }
        }

    }

    private DbCommand CreateCommand(string commandText, CommandType commandType, params SqlParameter[] parameters)
    {
        var command = GetConnection().CreateCommand();

        command.CommandText = commandText;
        command.CommandType = commandType;
        command.Transaction = GetActiveTransaction();
        foreach (var parameter in parameters)
        {
            command.Parameters.Add(parameter);
        }

        return command;
    }

    private void EnsureConnectionOpen()
    {
        var connection = GetConnection();

        if (connection.State != ConnectionState.Open)
        {
            connection.Open();
        }
    }

    private DbTransaction GetActiveTransaction()
    {
        return (DbTransaction)_transactionProvider.GetActiveTransaction(new ActiveTransactionProviderArgs
        {
            {"ContextType", typeof(DynasysSolutionDbContext) },
            {"MultiTenancySide", MultiTenancySide }
        });
    }

Hi team I built two website, one is Asp.net Core 8.7 ,the other is Asp.net Core10.1 i want to share user login authen for each other,can it be done thank you

Dear team, If there are some relationships under the master entity,when user delete the entity i want to pop friendly message instead of the 500. I used try catch in delete method, but the method cannot catch the exception i want to catch ,it still pop the 500. could you give me some advices thanks. my code as below; public async Task Delete(EntityDto<long> input) { try { await _companyRepository.DeleteAsync(input.Id); } catch(Exception ex) { throw new UserFriendlyException(L("CannotDeleteSupplier")); } }

angular asp.net core 8.7 Hi Team

I want to use security image question (captcha) on login.
![image.png](/QA/files/02d6e22c0146fe90b96939fb083ddae7.png)

But when I turn it on,There's an error as below,I can't access Google
ngx-captcha.js:742 GET https://www.google.com/recaptcha/api.js?onload=ngx_captcha_onload_callback&render=explicit net::ERR_CONNECTION_TIMED_OUT

HI Team,

When i run the command npm start in VSCode console, the nodejs use a lot of CPU & Memory, How can i sovle this issue?

Many thanks.

Angular aspnetcore V8.7

Dear ** An error occurred during publication**

28 error 403 403 Forbidden - PUT http://registry.npmjs.org/abp-zero-template - You do not have permission to publish "abp-zero-template". Are you logged in as the correct user? 29 error 403 In most cases, you or one of your dependencies are requesting 29 error 403 a package version that is forbidden by your security policy.

  • What is your product version?
  • 9.1
  • What is your product type (Angular or MVC)?
  • angular
  • What is product framework type (.net framework or .net core)?
  • .netcore

dear

When I log in the system, the url of the system is localhost:4200, which is a blank page

When I manually enter the address as http://localhost:4200/account/login ,the page is normal

When I successfully log in the system, the page becomes blank again, and it will not automatically jump to Dashaboard, I have to add the route manually like 'http://localhost:4200/app/admin/hostDashboard', so it's not a blank page

  • v8.7
  • Angular -.net core 3.1

What should I do to make my website Internet Explorer compatible

Showing 1 to 10 of 14 entries