Coder Social home page Coder Social logo

dotnet-architecture / eshopmodernizing Goto Github PK

View Code? Open in Web Editor NEW
912.0 912.0 552.0 130.62 MB

Modernizing existing .NET Framework, hypothetically legacy backoffice eShop web apps (traditional ASP.NET WebForms and MVC) with Windows Containers and Azure Cloud

License: MIT License

C# 21.18% CSS 1.24% JavaScript 69.36% PowerShell 1.98% Shell 0.25% Ruby 0.30% Batchfile 0.06% HTML 3.19% Dockerfile 0.02% ASP.NET 2.22% TSQL 0.17% XSLT 0.04%

eshopmodernizing's People

Contributors

ardalis avatar cesardelatorre avatar dependabot[bot] avatar dsrodenas avatar efleming18 avatar eiximenis avatar jamesmontemagno avatar johnpwsharp avatar licjapodaca avatar nishanil avatar oliag avatar prudykiteo avatar ridomin avatar shadynagy avatar sughosneo avatar tjain-ms avatar twsouthwick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eshopmodernizing's Issues

Not able to found the migration changes of eShopLegacyMVC in eShopModernizaing GitHub Repo.

Hi,
The Page: Example migration of eShop to ASP.NET Core uses current repo link which is given at the end of page but is not showing the migration changes that are discussed in the page for eShopLegacyMVC.
I tried to found in different branches of eShopLegacyMVC/ eShopModernizedMVC as well but no luck. Can some one please share the final repo link of "Migrated eShopLegacyMVC to ASP.NET Core if available.

How to add Certificate pfx to Docker Image?

I want to add an certificate to my Docker Image which authenticates with Azure Keyvault to get some secret values. I imported the certificate using DockerFile into the LocalMachine/My but my dotnet MVC application is not able to access it. It shows a Keyset does not exist error. The problem is probably of permissions as the IIS runs with some other Service Account which might not have access to the Private Machine Key.

Is there a way to add the Certificate to the Docker Image?

at wiki , Pls update for "09. How to add authentication authorization with Azure Active Directory"

Hi Team,

Existing Images are broken and ADD app registration are also changed now (in 2023 year) for below wiki sections

Wiki Navigation -
"09. How to add authentication authorization with Azure Active Directory(https://github.com/dotnet-architecture/eShopModernizing/wiki/09.-How-to-add-authentication-authorization-with-Azure-Active-Directory)" section.

Please, update above wiki page for better help and referencing.

Thanks,

K8s Dashboard not accessible

According to this instruction

the dashboard should be accessible at
http://localhost:port/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

In my case it is not accessible at all.

`kubectl proxy port 8888

`http://localhost:8888/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

triggers

Error: 'tls: oversized record received with length 20527'
Trying to reach: 'https://10.244.0.6:9090/'

and

http: TLS handshake error from :53950: EOF

Has anyone experienced this issue?

Feature - Azure App Configuration

Great book! Adding Azure App Configuration (Preview) to the solution, usage of secrets manager tool and Azure Managed Identities instead of embedded passwords would be an example of further modernizing and securing the architecture.

eShopModerniziMVC and Web Forms also have build errors Log4net 2.08

#57

Hello The same issue that occurred on the legacy solutions (link above) is happening inside the modernized solutions.

I tried to find the references and modify them to accept the newer version but no dice. I had to downgrade to log4net 2.08 to get the solution file to build.

Thanks!

eShopLegacyWebForms does not compile

I found this project during MS Learn Tutorial: https://docs.microsoft.com/pl-pl/learn/modules/aspnet-session/
During exercise I was told to download project from this repository. As stated in instructions, VS asked me to install additional components. During all this time, solution did not compile.
Unfortunately VS provided only ambiguous messages about missing or conflicting packages without any error code. However, after some research, I was able to fix this error by downgrading log4net nuget package to 2.0.8.0.
I can prepare a pull request if needed.

Docker Image Build Issue with VSTS

Hi,
I am trying to build docker image with VSTS by following the steps on Scenario C: Deploying from VSTS CD pipeline to an Azure VM using the Docker Tasks in VSTS in "https://github.com/dotnet-architecture/eShopModernizing/wiki/03.-How-to-deploy-your-Windows-Containers-based-app-into-Azure-VMs-(Including-CI-CD)".

I keep getting below error. does "obj\Docker\publish" suppose to exist? I am using hosted VS2017 agent to build. Do i need to create my own private docker build agent?


2018-01-05T19:22:22.8988540Z Step 4/4 : COPY ${source:-obj/Docker/publish} .
2018-01-05T19:22:23.6913778Z COPY failed: GetFileAttributesEx \?\C:\Windows\TEMP\docker-builder239959299\obj\Docker\publish: The system cannot find the path specified.
2018-01-05T19:22:34.4747563Z ##[error]C:\Program Files\Docker\docker.exe failed with return code: 1

Any help is appreciated!

Thanks,
Dennis

Unable to start debugging on the web server. The remote server returned an error: (403) Forbidden

I'm trying to follow the "02. How to containerize the .NET Framework web apps with Windows Containers and Docker" demo and I'm getting the following error on F5 of the docker-compose project:

image

Docker Debug Window:

========== Debugging ==========
docker ps --filter "status=running" --filter "name=dockercompose12807194206851661871_eshop.modernized.mvc_" --format {{.ID}} -n 1
0c0c4e368750
docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}" 0c0c4e368750
172.19.106.56
docker exec 0c0c4e368750 cmd /c "C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].processModel.identityType:LocalSystem /commit:apphost & C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/security/authentication/anonymousAuthentication /userName: /commit:apphost"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.webServer/security/authentication/anonymousAuthentication" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

VS 2017 (15.9.10)

Getting issue "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections" after running the mvc web app after deployment to aci

Getting issue "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections"
I followed same steps as in article to deploy the images to ACI

First time deploying a SQL Container to a Service Fabric cluster takes long and timeout errors appear

The first time you deploy a SQL Container to a Service Fabric cluster it will take long and timeout errors, like the ones below, appear in SF Explorer.

You'll need to wait for quite some time the first time until the SQL Server Docker image (it is large) gets pulled from Docker Hub and everything is installed.

image

In the case experienced, when deployed the SQL Server container in the first place, it took almost 1h for the Service Fabric to get the SQL Server container due to initial timeouts. But, if you just wait, you should get it running finally like here:

image

After that, you can connect to the SQL Container from SQL Server Management Studio, provided that you opened the needed port in the SF cluster ant the SF SQL service enpoint at the ServiceManifest.xml, so you can see the SQL Server like here:

image

at wiki , Pls reupload correct images which are not loading for "Deploying from VSTS CD pipeline to Kubernetes in ACS" sections

Hi General,

Below navigation wiki page, images are not loading for "Deploying from VSTS CD pipeline to Kubernetes in ACS" sections as
image

Wiki section, Navigation -
Looking into "dotnet-architecture/eShopModernizing" github code repo and navigating to "04. How to deploy your Windows Containers based apps into Kubernetes in Azure Container Service (Including CI CD)" wiki section (https://github.com/dotnet-architecture/eShopModernizing/wiki/04.-How-to-deploy-your-Windows-Containers-based-apps-into-Kubernetes-in-Azure-Container-Service-(Including-CI-CD))

pls, reupload correct images.

Thanks,

Update to .NET 8

  • Update main nugets & net version
  • Update docker
  • update readme
  • work on release notes
  • make sure docker up work
  • make sure azd up works
  • make sure github actions are all working
  • Update documentation to mention .NET 8
  • Update ebook

Deploy specific version of docker container with VSTS release definition

Hi,
I understand from your article how to implement CI/CD to be able to push docker containers to docker repository and deploy them in Service Fabric Cluster. To my understanding, this VSTS release definition will always deploy the latest docker container of my application, not deploying the specific version. I would like to understand if there is a way to deploy specific docker version to Service Fabric using VSTS release definition.

Here is the example of my scenario. Currently Service Fabric cluster is deployed with my service's docker container version, say 1.10.4. I am adding a new feature in the code and commit. VSTS continuous integration will automatically release another docker container version, let's say 2.1.0. Now, is there a way to specifically configure release definition to deploy the specific version? So that I can deploy any release definition instance to deploy that specific docker container version, instead of having it always deploy the latest docker container version.

Thanks in advance.

Add "Docker Support" link is incorrect on the WCF service and Winforms wiki page

How is Local Kubernetes with Docker for Windows working?

I've been looking at the Local Kubernetes with Docker for Windows guide and i'm not sure if it's supposed to work or not.

The guide suggests that both linux and windows containers will be running on the cluster but currently the Kubernetes cluster provided by docker for windows is linux only. When I deploy the kubernetes manifest the pods are permanently pending because there are 0/1 available windows nodes. Specifically this step from the guide.

I'm trying to PoC a hybrid K8s cluster running window and linux containers.

Redundant GetContainerReference calls

There's a redundant call to blobClient.GetContainerReference in both the MVC and WebForms projects.

CloudBlobContainer container = blobClient.GetContainerReference("pics");
container = blobClient.GetContainerReference("pics");

CloudBlobContainer container = blobClient.GetContainerReference("pics");
container = blobClient.GetContainerReference("pics");

02. How to containerize the .NET Framework web apps with Windows Containers and Docker - errors

There are inconsistencies between the walkthrough and the actual experience locally on my environment.

Add - Docker Support generates only these two files in Solution Explorer ( VS 2022 Preview), no .yml are present as per screenshot of this walkthrough ( see section: Using Visual Studio to add Docker Support to the application.

image

Eventually two images are downloaded and extracted in Docker.

image

When build starts errors appears as below.

Lastly, website starts but it's broken:

image

Build started...
1>------ Build started: Project: eShopLegacyMVC, Configuration: Debug Any CPU ------
NU1608: Detected package version outside of dependency constraint: Autofac.Mvc5 4.0.2 requires Autofac (>= 4.0.1 && < 5.0.0) but version Autofac 6.1.0 was resolved.
NU1605: Detected package downgrade: System.Diagnostics.DiagnosticSource from 4.7.1 to 4.5.1. Reference the package directly from the project to select a different version.
eShopLegacyMVC -> Autofac 6.1.0 -> System.Diagnostics.DiagnosticSource (>= 4.7.1)
eShopLegacyMVC -> System.Diagnostics.DiagnosticSource (>= 4.5.1)
NU1605: Detected package downgrade: System.Threading.Tasks.Extensions from 4.5.2 to 4.5.1. Reference the package directly from the project to select a different version.
eShopLegacyMVC -> Autofac 6.1.0 -> Microsoft.Bcl.AsyncInterfaces 1.1.0 -> System.Threading.Tasks.Extensions (>= 4.5.2)
eShopLegacyMVC -> System.Threading.Tasks.Extensions (>= 4.5.1)
1> Consider app.config remapping of assembly "System.Net.Http.Formatting, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.2.7.0" [C:\Users\oluca.nuget\packages\microsoft.aspnet.webapi.client\5.2.7\lib\net45\System.Net.Http.Formatting.dll] to solve conflict and get rid of warning.
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 3 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 4 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): warning MSB3026: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): error MSB3027: Could not copy "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". Exceeded retry count of 10. Failed. The file is locked by: "vmwp.exe (23816), vmmem (2992)"
1>C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4631,5): error MSB3021: Unable to copy file "obj\Debug\eShopLegacyMVC.dll" to "bin\eShopLegacyMVC.dll". The process cannot access the file 'bin\eShopLegacyMVC.dll' because it is being used by another process.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.