aspnetrun / run-aspnetcore-microservices

Microservices on .Net platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12
https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=JULY24
MIT License
2.55k stars 1.38k forks source link

Login error when creating seed data (but only) when Ordering.API runs in Docker. Once manually created, it runs correctly #8

Closed mehmetozkaya closed 3 years ago

mehmetozkaya commented 3 years ago

For some reason when I run the Ordering.API's GET command to retrieve the orders I getting the following error

.SqlException (0x80131904): Cannot open database "OrderDb" requested by the login. The login failed.

However, if I run the same code from Visual Studio targeting the same database, the database gets created with seed data with no problem. After that... once with the seed data created by the instance running with Visual Studio, if I switch back to the OrderingAPI running in Docker and run GET orders again then I do see the seed data.


workaround solution applied; https://github.com/aspnetrun/run-aspnetcore-microservices/commit/48864011205519cd11d343fce41104c9f5191bb2


Need stable solution.