desenvolvedor-io / dev-store Goto Github PK
View Code? Open in Web Editor NEWA microservices e-commerce reference application built with ASP.NET 6
Home Page: https://devstore.academy
License: MIT License
A microservices e-commerce reference application built with ASP.NET 6
Home Page: https://devstore.academy
License: MIT License
Describe the bug
When I try to use Add-Migration DbInit -context OrdersContext in project DevStore.Orders.Infra I got this error bellow:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Generate migrations files
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The website needs Google Tag Manager to measure important analytic data
At
PedidoQuery
public async Task<PedidoDTO> ObterUltimoPedido(Guid clienteId)
It throws error if the Query return null. Usually after a successful order payment.
Describe the bug
I used to run this project without any issues for a while, to understand and learn some things. However, lately it has started to throw this error related to the encryption part. It seems like the project is not recognizing the location of the certificate, is there a way to bypass this or completely mitigate this error?
To Reproduce
Steps to reproduce the behavior:
docker-compose up
Stacktrace
devstore-web-mvc-ecommerce | Unhandled exception. Interop+Crypto+OpenSslCryptographicException: error:2006D080:BIO routines:BIO_new_file:no such file devstore-web-mvc-ecommerce | at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle) devstore-web-mvc-ecommerce | at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromFile(String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags) devstore-web-mvc-ecommerce | at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) devstore-web-mvc-ecommerce | at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Certificates.CertificateConfigLoader.LoadCertificate(CertificateConfig certInfo, String endpointName) devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.LoadDefaultCert() devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Reload() devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.Load() devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken) devstore-web-mvc-ecommerce | at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) devstore-web-mvc-ecommerce | at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) devstore-web-mvc-ecommerce | at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) devstore-web-mvc-ecommerce | at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) devstore-web-mvc-ecommerce | at Program.<Main>$(String[] args) in /src/web/DevStore.WebApp.MVC/Program.cs:line 22 devstore-web-mvc-ecommerce | at Program.<Main>(String[] args) devstore-web-mvc-ecommerce exited with code 139
Expected behavior
Run all services correctly and have no issues with openssl.
Desktop (please complete the following information):
Aditional Info
I tried on several different computers and different OS's believing that it was only in my environment or if it was some wrong configuration of my docker, but on these 4 computers it gave the same error.
When generate-pfx tries to delete a file that does not exist in the certs folder, the certificate creation process is aborted.
When some anonymous user try to put some item into shopping cart receives an error.
The expected behaviour was redirect to login page.
Create a Notifications Microservice responsible to manage all notifications (such as email, WhatsApp, SMS etc.) for order status changes, password changes etc.
We need better health checker to monitor database and other api's dependencies.
When running from local machine at Sql Server on Docker some queries get broken because the TimeZone.
But there are items at Database:
So, sending the "DateTime.Now" from API Backend it works:
public async Task<PedidoDTO> ObterUltimoPedido(Guid clienteId)
{
const string sql = @"SELECT
P.ID AS 'ProdutoId', P.CODIGO, P.VOUCHERUTILIZADO, P.DESCONTO, P.VALORTOTAL,P.PEDIDOSTATUS,
P.LOGRADOURO,P.NUMERO, P.BAIRRO, P.CEP, P.COMPLEMENTO, P.CIDADE, P.ESTADO,
PIT.ID AS 'ProdutoItemId',PIT.PRODUTONOME, PIT.QUANTIDADE, PIT.PRODUTOIMAGEM, PIT.VALORUNITARIO
FROM PEDIDOS P
INNER JOIN PEDIDOITEMS PIT ON P.ID = PIT.PEDIDOID
WHERE P.CLIENTEID = @clienteId
AND P.DATACADASTRO between DATEADD(minute, -30, @Now) and @Now
ORDER BY P.DATACADASTRO DESC";
var pedido = await _pedidoRepository.ObterConexao()
.QueryAsync<dynamic>(sql, new { clienteId, Now = DateTime.Now });
if (!pedido.Any())
return null;
return MapearPedido(pedido);
}
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
A banner to show visitors the site is just a demo and not a real store. The banner must have a link to this repository.
Why not use cancellation token on the project ?
There are some projects that are using Dapper. E.g ProductRepository.
We are seeking to replace with EF Core. To be a database agnostic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.