[{"data":1,"prerenderedAt":1081},["ShallowReactive",2],{"tag-azure":3},{"tag":4,"articles":24},{"id":5,"title":6,"body":7,"description":14,"extension":15,"img":16,"meta":17,"name":18,"navigation":19,"path":20,"seo":21,"stem":22,"__hash__":23},"tags\u002Ftags\u002Fazure.md","Azure",{"type":8,"value":9,"toc":10},"minimark",[],{"title":11,"searchDepth":12,"depth":12,"links":13},"",2,[],"Azure cloud platform is more than 200 products and cloud services designed to help you bring new solutions to life","md","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"azure",true,"\u002Ftags\u002Fazure",{"description":14},"tags\u002Fazure","m01ax_ShM5MuWl7UByoMyql_zrDRu_4udP4MyD4fL-k",[25,430,509,607,715,953],{"id":26,"title":27,"author":28,"body":29,"createdAt":421,"description":422,"extension":15,"img":423,"meta":424,"navigation":19,"path":425,"seo":426,"stem":427,"tags":428,"updatedAt":421,"__hash__":429},"articles\u002Farticles\u002Fazure-appservices-containersapps.md","Comparing Azure App Services and Azure Container Apps Features Benefits Pros and Cons",null,{"type":8,"value":30,"toc":412},[31,36,40,46,49,51,55,62,67,101,106,132,137,157,161,166,170,202,206,231,235,255,259,265,271,275,278,393,395,399,404,409],[32,33,35],"h3",{"id":34},"comparing-azure-app-services-and-azure-container-apps-features-benefits-pros-and-cons","Comparing Azure App Services and Azure Container Apps: Features, Benefits, Pros, and Cons",[37,38,39],"p",{},"When deploying and managing applications on Azure, two prominent options stand out: Azure App Services and Azure Container Apps. Both cater to different use cases and offer distinct features. Here, we'll dive into their differences, benefits, pros, and cons, and examine their performance features.",[41,42],"img",{"style":43,"src":44,"alt":45,"title":45},"display: inline;","\u002Farticles\u002Fimages\u002Fappservices_vs_containerapps_2.png","image",[47,48],"br",{},[47,50],{},[32,52,54],{"id":53},"azure-app-services","Azure App Services",[37,56,57,61],{},[58,59,60],"strong",{},"Overview:","\nAzure App Services is a platform-as-a-service (PaaS) offering that allows developers to build, deploy, and scale web apps, mobile backends, and RESTful APIs.",[37,63,64],{},[58,65,66],{},"Benefits:",[68,69,70,77,83,89,95],"ul",{},[71,72,73,76],"li",{},[58,74,75],{},"Managed Environment:"," Handles infrastructure management, including patching and scaling.",[71,78,79,82],{},[58,80,81],{},"Integrated Development Environment:"," Supports multiple languages and frameworks like .NET, Java, Node.js, PHP, Python, and Ruby.",[71,84,85,88],{},[58,86,87],{},"Deployment Options:"," Facilitates continuous integration and deployment with GitHub, Azure DevOps, and other CI\u002FCD tools.",[71,90,91,94],{},[58,92,93],{},"Built-in Services:"," Includes load balancing, auto-scaling, and built-in monitoring and diagnostics.",[71,96,97,100],{},[58,98,99],{},"Security:"," Offers SSL certificates, custom domain names, and compliance with industry standards.",[37,102,103],{},[58,104,105],{},"Pros:",[68,107,108,114,120,126],{},[71,109,110,113],{},[58,111,112],{},"Ease of Use:"," Simplified deployment and management with minimal configuration.",[71,115,116,119],{},[58,117,118],{},"Scalability:"," Automatically scales up or out based on demand.",[71,121,122,125],{},[58,123,124],{},"Integration:"," Seamless integration with other Azure services (e.g., Azure SQL Database, Azure Storage).",[71,127,128,131],{},[58,129,130],{},"Cost Management:"," Flexible pricing plans, including a free tier for basic apps.",[37,133,134],{},[58,135,136],{},"Cons:",[68,138,139,145,151],{},[71,140,141,144],{},[58,142,143],{},"Limited Customization:"," Limited control over the underlying infrastructure.",[71,146,147,150],{},[58,148,149],{},"Dependency on Azure Ecosystem:"," Strongly tied to Azure services, which might be a drawback for multi-cloud strategies.",[71,152,153,156],{},[58,154,155],{},"Complexity in Advanced Scenarios:"," May require workarounds or additional services for complex scenarios like multi-region deployments or specific compliance requirements.",[32,158,160],{"id":159},"azure-container-apps","Azure Container Apps",[37,162,163,165],{},[58,164,60],{},"\nAzure Container Apps is a serverless container service designed to build and deploy modern applications using microservices and container orchestration.",[37,167,168],{},[58,169,66],{},[68,171,172,178,184,190,196],{},[71,173,174,177],{},[58,175,176],{},"Serverless:"," Abstracts the underlying infrastructure, allowing developers to focus on application logic.",[71,179,180,183],{},[58,181,182],{},"Microservices Support:"," Ideal for deploying applications composed of multiple microservices.",[71,185,186,189],{},[58,187,188],{},"Flexibility:"," Supports any containerized application, irrespective of the programming language or framework.",[71,191,192,195],{},[58,193,194],{},"Event-driven Architecture:"," Integrates with Azure Event Grid, Azure Functions, and other event-driven services.",[71,197,198,201],{},[58,199,200],{},"Auto-scaling:"," Automatically scales based on HTTP traffic or custom metrics.",[37,203,204],{},[58,205,105],{},[68,207,208,214,220,225],{},[71,209,210,213],{},[58,211,212],{},"Agility:"," Quick to deploy and update containerized applications.",[71,215,216,219],{},[58,217,218],{},"Granular Control:"," More control over the runtime environment compared to App Services.",[71,221,222,224],{},[58,223,118],{}," Efficient scaling at the container level, supporting spikes in demand.",[71,226,227,230],{},[58,228,229],{},"Portability:"," Containers can be moved across different environments, including on-premises and other cloud providers.",[37,232,233],{},[58,234,136],{},[68,236,237,243,249],{},[71,238,239,242],{},[58,240,241],{},"Complexity:"," Requires understanding of containerization and orchestration concepts.",[71,244,245,248],{},[58,246,247],{},"Cold Start Latency:"," Potential cold start issues similar to other serverless offerings.",[71,250,251,254],{},[58,252,253],{},"Resource Management:"," Although managed, you still need to handle aspects like container lifecycle and resource optimization.",[32,256,258],{"id":257},"performance-features-comparison","Performance Features Comparison",[37,260,261,262,264],{},"When comparing performance features, Azure App Services and Azure Container Apps offer distinct capabilities tailored to their respective use cases. ",[58,263,54],{}," provides performance optimization through automatic scaling, load balancing, and built-in caching mechanisms. It supports scaling both vertically (increasing the power of existing instances) and horizontally (adding more instances) based on predefined metrics or schedules. App Services also integrates seamlessly with Azure CDN for improved global performance and Azure Traffic Manager for efficient traffic distribution.",[37,266,267,268,270],{},"In contrast, ",[58,269,160],{}," leverages Kubernetes-based orchestration under the hood, offering granular control over performance tuning. It excels in handling microservices architectures, allowing individual containers to scale independently based on specific metrics, such as CPU and memory usage. This fine-grained scaling ensures optimal resource utilization and performance efficiency for each microservice. Container Apps also support advanced networking features, such as service mesh integration, which enhances performance by optimizing service-to-service communication within the application.",[32,272,274],{"id":273},"when-to-use-each-service","When to Use Each Service",[37,276,277],{},"Here's a table summarizing when each service is well suited:",[279,280,281,301],"table",{},[282,283,284],"thead",{},[285,286,287,293,297],"tr",{},[288,289,290],"th",{},[58,291,292],{},"Scenario",[288,294,295],{},[58,296,54],{},[288,298,299],{},[58,300,160],{},[302,303,304,316,327,338,349,360,371,382],"tbody",{},[285,305,306,310,313],{},[307,308,309],"td",{},"Traditional web apps and APIs",[307,311,312],{},"Best suited for simple, monolithic applications",[307,314,315],{},"Not ideal",[285,317,318,321,324],{},[307,319,320],{},"Rapid development and deployment",[307,322,323],{},"Excellent choice with easy CI\u002FCD integration",[307,325,326],{},"Suitable, but requires container knowledge",[285,328,329,332,335],{},[307,330,331],{},"Minimal infrastructure management",[307,333,334],{},"Ideal, as it abstracts infrastructure complexities",[307,336,337],{},"Provides some abstraction, but requires container management",[285,339,340,343,346],{},[307,341,342],{},"Applications with predictable traffic",[307,344,345],{},"Handles predictable scaling efficiently",[307,347,348],{},"Handles scaling well, but shines with fluctuating workloads",[285,350,351,354,357],{},[307,352,353],{},"Microservices architecture",[307,355,356],{},"Not optimized for microservices",[307,358,359],{},"Perfectly suited for microservices",[285,361,362,365,368],{},[307,363,364],{},"Granular performance tuning",[307,366,367],{},"Limited to platform capabilities",[307,369,370],{},"Offers fine-grained control and optimization",[285,372,373,376,379],{},[307,374,375],{},"Multi-cloud and portability needs",[307,377,378],{},"Tightly integrated with Azure ecosystem",[307,380,381],{},"Highly portable across different environments",[285,383,384,387,390],{},[307,385,386],{},"Event-driven applications",[307,388,389],{},"Can be integrated with event-driven services",[307,391,392],{},"Natively supports event-driven architectures",[47,394],{},[32,396,398],{"id":397},"conclusion","Conclusion",[37,400,401,403],{},[58,402,54],{}," is best for developers looking for a straightforward way to deploy web apps and APIs without worrying about infrastructure management. It's ideal for traditional web applications that require a quick and easy deployment process.",[37,405,406,408],{},[58,407,160],{}," is suited for developers who need more control over their application environment and want to deploy modern, containerized applications with microservices architecture. It offers greater flexibility and is more suitable for complex applications requiring fine-grained scaling and orchestration.",[37,410,411],{},"Choosing between the two depends on your application's architecture, your team's expertise with containers, and your need for control versus ease of use. Whether you prioritize the simplicity and integrated services of App Services or the granular control and performance optimization of Container Apps, Azure has a solution to meet your needs.",{"title":11,"searchDepth":12,"depth":12,"links":413},[414,416,417,418,419,420],{"id":34,"depth":415,"text":35},3,{"id":53,"depth":415,"text":54},{"id":159,"depth":415,"text":160},{"id":257,"depth":415,"text":258},{"id":273,"depth":415,"text":274},{"id":397,"depth":415,"text":398},"2024-06-12T15:44:03.462Z","When deploying and managing applications on Azure, two prominent options stand out. Azure App Services and Azure Container Apps. Both cater to different use cases and offer distinct features. Here, we'll dive into their differences, benefits, pros, and cons, and examine their performance features.","\u002Farticles\u002Fimages\u002Fappservices_vs_containerapps.png",{},"\u002Farticles\u002Fazure-appservices-containersapps",{"title":27,"description":422},"articles\u002Fazure-appservices-containersapps",[18],"gXbVnG9BGDl9U618t6qtPPrPHpfcxpLl8gKn_ydmDbI",{"id":431,"title":432,"author":433,"body":434,"createdAt":501,"description":502,"extension":15,"img":498,"meta":503,"navigation":19,"path":504,"seo":505,"stem":506,"tags":507,"updatedAt":501,"__hash__":508},"articles\u002Farticles\u002Fazure-appservice-http-error-50030-ancm-in-process-start-failure.md","Azure AppService HTTP Error 500.30 ANCM InProcess Start Failure","[object Object]",{"type":8,"value":435,"toc":499},[436,439,442,445,448,451,458,464,466,468,479,484,495],[37,437,438],{},"Again, up against the 500.30 –> really means that something is wrong (usually configuration, appsettings incorrect etc.) which prevents the application from starting up.",[37,440,441],{},"Todays', resolution…",[37,443,444],{},"- Launch Kudu from the Azure Portal (under Advanced Tools)",[37,446,447],{},"- Use Debug console – CMD",[37,449,450],{},"- Use command prompt DOS commands to navigate to \\site\\wwwroot",[37,452,453,454],{},"- Try starting the application via dotnet web.dll ",[455,456,457],"em",{},"(the name of your web application dll)",[37,459,460,463],{},[455,461,462],{},"- ","With any luck, the output will show log errors and with some thought you can decipher what configuration piece is missing (in this case, my connection string was incorrect and I was missing App_Data directory)",[47,465],{},[47,467],{},[68,469,470,473,476],{},[71,471,472],{},"The application failed to start",[71,474,475],{},"The application started but then stopped",[71,477,478],{},"The application started but threw an exception during startup",[480,481,483],"h4",{"id":482},"troubleshooting-steps","Troubleshooting steps:",[68,485,486,489,492],{},[71,487,488],{},"Check the system event log for error messages",[71,490,491],{},"Enable logging the application process' stdout messages",[71,493,494],{},"Attach a debugger to the application process and inspect",[496,497],"a",{"href":498},"\u002Farticles\u002Fimages\u002Fimage_637348425926534448.png",{"title":11,"searchDepth":12,"depth":12,"links":500},[],"2020-09-04T18:56:32.880Z","While hosting an application within Azure AppService, I was up against the dreaded 500.30 ANCM exception.  Following is an approach to help get to resolution.",{},"\u002Farticles\u002Fazure-appservice-http-error-50030-ancm-in-process-start-failure",{"title":432,"description":502},"articles\u002Fazure-appservice-http-error-50030-ancm-in-process-start-failure",[18],"k2bCHrW85oXKlPnYGZmUFSD9tgg9OapWFupo2DLTSBs",{"id":510,"title":511,"author":28,"body":512,"createdAt":598,"description":599,"extension":15,"img":536,"meta":600,"navigation":19,"path":602,"seo":603,"stem":604,"tags":605,"updatedAt":598,"__hash__":606},"articles\u002Farticles\u002Fdevops–pushing-nuget-package-to-azure-artifacts-repository.md","DevOps–Pushing Nuget package to Azure Artifacts Repository",{"type":8,"value":513,"toc":596},[514,517,520,523,526,529,532,537,540,543,546,563,566,572,578,581,588,593],[37,515,516],{},"What a journey\n",[37,518,519],{},"I am going to document this for the sole reason that I am aware that I will once again need this information\nonly just a few days from now. Problem: I have a nuget package that I want to push to an Azure Artifact directory.",[37,521,522],{},"I figured easy enough there is some documentation, and I tried with the following:",[37,524,525],{},"nuget push -source \"MyFeed_feed\" -apikey az \"C:\\tfs\\Git\\MLayout\\MLayout\\MLayout\\bin\\Debug\\Layout.1.0.0.nupkg\"",[37,527,528],{},"I did have to download Nuget and ensure it was found when using the above command via command prompt. \nOnce setup, and re-ran I was prompted for username and password. As many times as I tried it would just continue to fail and eventually\nwould timeout. I am sure this worked just a few weeks ago.",[37,530,531],{},"Regardless on to plan B, documentation..",[37,533,534],{},[41,535],{"alt":11,"src":536},"\u002Farticles\u002Fimages\u002Fimage_637275041288251465.png",[37,538,539],{},"1) I downloaded the latest Nuget.exe",[37,541,542],{},"2) Download and install the credential provider (this one was a bit more challenging)",[37,544,545],{},"I figured I would use the Automatic approach. ",[37,547,548,549,552,556,557,562],{},"a) I downloaded installcredprovider.ps1 from this github location\n",[496,550],{"href":551},"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fartifacts-credprovider\u002Ftree\u002Fmaster\u002Fhelpers",[496,553,551],{"href":551,"rel":554},[555],"nofollow","\n(more information can be found ",[496,558,561],{"href":559,"target":560},"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fartifacts-credprovider#azure-artifacts-credential-provider","_blank","here",")",[37,564,565],{},"b) Now that I have a file on disk, I have to run it. I started Powershell then proceeded to run this\nps1 by typing .\\installcredprovider.ps1 at the PS>",[37,567,568,571],{},[41,569],{"alt":11,"src":570},"\u002Farticles\u002Fimages\u002Fimage_637275041290983297.png","\nd) Now with this installed I retried to push my nuget package with nuget push -source \"MyFeed_feed\" -apikey az \"C:\\tfs\\Git\\MLayout\\MLayout\\MLayout\\bin\\Debug\\Layout.1.0.0.nupkg\"",[37,573,574,577],{},[58,575,576],{},"No go, ","so I tried with using the vs.net command prompt.",[37,579,580],{},"I opened up a command prompt from Windows-Start ensuring to pick the “Developer Command Prompt for VS 2019”",[37,582,583,584,587],{},"Now, I ensured that nuget.exe was available and it was! ",[58,585,586],{},"So I retried my nuget push",". You can see finally, that it used the Credential Provider",[37,589,590],{},[41,591],{"alt":11,"src":592},"\u002Farticles\u002Fimages\u002Fimage_637275041296161377.png",[37,594,595],{},"The entire process probably 1 hour of effort, but essentially using the VS.NET 2019 command prompt, download the ps1 for the credprovider,\nexecute using powershell then retry.",{"title":11,"searchDepth":12,"depth":12,"links":597},[],"2020-06-11T20:28:49.852Z","Some days you can be really productive, and others some very simple things just seem to eat up time.  Today, I came across the latter and thought I would document for others and also myself.  Installing a credprovider in order to push a nuget package to Auzre-DevOps.  Read on...",{"name":601},"David","\u002Farticles\u002Fdevops-pushing-nuget-package-to-azure-artifacts-repository",{"title":511,"description":599},"articles\u002Fdevops–pushing-nuget-package-to-azure-artifacts-repository",[18],"Zw3qsYjIGVLIj9PIXvZHt_pkg1PaGxS6xuD33wiVVHg",{"id":608,"title":609,"author":28,"body":610,"createdAt":707,"description":708,"extension":15,"img":628,"meta":709,"navigation":19,"path":710,"seo":711,"stem":712,"tags":713,"updatedAt":707,"__hash__":714},"articles\u002Farticles\u002Fazure-devops-file-transformation-pipeline.md","Azure DevOps File Transformation Pipeline",{"type":8,"value":611,"toc":705},[612,615,621,631,634,644,647,668,671,692],[37,613,614],{},"Running locally via Visual Studio and JetBrains Rider and managing the ASPNETCORE_ENVIRONMENT variable has been challenging.  Changing and setting ASPNETCORE_ENVIRONMENT within launchSettings.json and\u002For within Project Properties impacts the web.{envrionment}.config files.  Without the appropriate configuration within the publish steps the site was being deployed with incorrect settings and it was time consuming to track it back to the best approach.  So for now I have a pipeline build process setup for each AppService ‘slot’ setting different BuildConfiguration within each to ensure the most appropriate web.config is deployed.",[37,616,617,618,620],{},"This is a .net core asp.net web application so why the web.config? It appears that locally during IIS Express\u002FIIS there is still a dependency on this web.config to identify the hosting model (inprocess) and reference to the exe that would be run.  This is of course when deploying to Windows infrastructure.",[47,619],{},"\nProject Properties – Environment variables",[37,622,623],{},[496,624,626],{"href":625},"\u002Farticles\u002Fimages\u002Fimage_637262774405512580.png",[41,627],{"style":43,"title":45,"src":628,"alt":45,"width":629,"height":630},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774407471496.png",457,345,[37,632,633],{},"My launchSettings.json – you can see I can modify before running how IIS or IIS Express identifies the environment variable",[37,635,636],{},[496,637,639],{"href":638},"\u002Farticles\u002Fimages\u002Fimage_637262774409386358.png",[41,640],{"style":43,"title":45,"src":641,"alt":45,"width":642,"height":643},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774411646559.png",463,415,[37,645,646],{},"The resultant\u002Frelated web.configs looks like the following for Development and Staging environments.",[37,648,649,650,658,660,661],{},"web.config\n",[496,651,653],{"href":652},"\u002Farticles\u002Fimages\u002Fimage_637262774414383837.png",[41,654],{"style":43,"title":45,"src":655,"alt":45,"width":656,"height":657},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774416208149.png",484,113,[47,659],{},"\nweb.Staging.config (you can see the addition of the xdt:Transform=”Replace” attribute which informs publish that when building for Staging to replace this variable within web.config with this value)\n",[496,662,664],{"href":663},"\u002Farticles\u002Fimages\u002Fimage_637262774419133421.png",[41,665],{"style":43,"title":45,"src":666,"alt":45,"width":656,"height":667},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774421036401.png",117,[37,669,670],{},"By default the build process on Azure DevOps – Pipelines was ignoring any file transformation requirements.  In order to establish File Transformation on publish notice the –configuration $(BuildConfiguration)",[37,672,673,681,683,684],{},[496,674,676],{"href":675},"\u002Farticles\u002Fimages\u002Fimage_637262774423325714.png",[41,677],{"style":43,"title":45,"src":678,"alt":45,"width":679,"height":680},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774425301819.png",661,295,[47,682],{},"\nand the respective variable that is used during publish to identify the appropriate configuration to use (development\u002Fstaging etc.)\n",[496,685,687],{"href":686},"\u002Farticles\u002Fimages\u002Fimage_637262774427383207.png",[41,688],{"style":43,"title":45,"src":689,"alt":45,"width":690,"height":691},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774428896829.png",702,164,[37,693,694,695,697],{},"After the build and using App Service Editor my web.config was successfully transformed",[47,696],{},[496,698,700],{"href":699},"\u002Farticles\u002Fimages\u002Fimage_637262774431201007.png",[41,701],{"style":43,"title":45,"src":702,"alt":45,"width":703,"height":704},"\u002Farticles\u002Fimages\u002Fimage_thumb_637262774433117797.png",700,190,{"title":11,"searchDepth":12,"depth":12,"links":706},[],"2020-05-28T15:44:03.462Z","Azure DevOps. Build Pipelines and establishing build configurations when deploying to a Windows environment.  The following is quick documentation walking through the process to ensure appropriate web.config files and transforms are performing during the publish steps within your pipeline.  This is one approach used, while I believe there are still other alternatives available.",{},"\u002Farticles\u002Fazure-devops-file-transformation-pipeline",{"title":609,"description":708},"articles\u002Fazure-devops-file-transformation-pipeline",[18],"lk4UjX3qvCsYs7rdaocW7xYDRc5SC2dkZpoMWRp45C4",{"id":716,"title":717,"author":28,"body":718,"createdAt":944,"description":722,"extension":15,"img":945,"meta":946,"navigation":19,"path":947,"seo":948,"stem":949,"tags":950,"updatedAt":944,"__hash__":952},"articles\u002Farticles\u002Fwindowscryptographicexception-the-system-cannot-find-the-file-specified.md","WindowsCryptographicException The system cannot find the file specified.",{"type":8,"value":719,"toc":942},[720,723,726,753,756,770,938],[37,721,722],{},"Azure – while trying to read pfx (certificate) from disk I came across a number of issues, but thought this might help some out.",[37,724,725],{},"The fix was adding the final parameter X509KeyStorageFlags",[727,728,732],"pre",{"className":729,"code":730,"language":731,"meta":11,"style":11},"language-cs shiki shiki-themes github-light github-dark","var cert = new X509Certificate2(\n    $\"{Environment.ContentRootPath}\u002FApp_Data\u002Fmycert.pfx\",\"{password}\",\n    X509KeyStorageFlags.MachineKeySet); \n","cs",[733,734,735,743,748],"code",{"__ignoreMap":11},[736,737,740],"span",{"class":738,"line":739},"line",1,[736,741,742],{},"var cert = new X509Certificate2(\n",[736,744,745],{"class":738,"line":12},[736,746,747],{},"    $\"{Environment.ContentRootPath}\u002FApp_Data\u002Fmycert.pfx\",\"{password}\",\n",[736,749,750],{"class":738,"line":415},[736,751,752],{},"    X509KeyStorageFlags.MachineKeySet);\n",[37,754,755],{},"Other references:",[37,757,758,761,764,767],{},[496,759],{"href":760},"https:\u002F\u002Fsupport.microsoft.com\u002Fen-us\u002Fhelp\u002F950090\u002Finstalling-a-pfx-file-using-x509certificate-from-a-standard-net-applic",[496,762,760],{"href":760,"rel":763},[555],[496,765],{"href":766},"https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F52750160\u002Fwhat-is-the-rationale-for-all-the-different-x509keystorageflags",[496,768,766],{"href":766,"rel":769},[555],[727,771,775],{"className":772,"code":773,"language":774,"meta":11,"style":11},"language-html shiki shiki-themes github-light github-dark","An unhandled exception occurred while processing the request.\nWindowsCryptographicException: The system cannot find the file specified. System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions)  \nException: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler\u003CTOptions>.HandleRequestAsync()  \nStack Query Cookies Headers Routing \nWindowsCryptographicException: The system cannot find the file specified. System.Security.Cryptography.CngKey.Open(string keyName, \n    CngProvider provider, CngKeyOpenOptions openOptions) \nSystem.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider) \nInternal.Cryptography.Pal.CertificatePal.GetPrivateKey\u003CT>(Func\u003CCspParameters, T> createCsp, Func\u003CCngKey, T> createCng) \nInternal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey() \nSystem.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() \nMicrosoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey() \nMicrosoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKeyStatus() \nMicrosoft.IdentityModel.Tokens.AsymmetricSignatureProvider.FoundPrivateKey(SecurityKey key) \nMicrosoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures) \nMicrosoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures, \n        CryptoProviderFactory cryptoProviderFactory) \nMicrosoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, string algorithm, bool willCreateSignatures) \nMicrosoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, string algorithm)  Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities.CreateEncodedSignature(string input, SigningCredentials signingCredentials) System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.WriteToken(SecurityToken token)  Sample.Idp.Startup+\u003C>c__DisplayClass7_0.\u003CConfigureServices>b__8(AuthorizationCodeReceivedContext context) in Startup.cs\nMicrosoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.AuthorizationCodeReceived(AuthorizationCodeReceivedContext context) Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt) \nMicrosoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync() \n","html",[733,776,777,783,788,800,806,812,818,824,854,860,866,872,878,884,890,896,902,908,926,932],{"__ignoreMap":11},[736,778,779],{"class":738,"line":739},[736,780,782],{"class":781},"sVt8B","An unhandled exception occurred while processing the request.\n",[736,784,785],{"class":738,"line":12},[736,786,787],{"class":781},"WindowsCryptographicException: The system cannot find the file specified. System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions)  \n",[736,789,790,793,797],{"class":738,"line":415},[736,791,792],{"class":781},"Exception: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler\u003C",[736,794,796],{"class":795},"s7hpK","TOptions",[736,798,799],{"class":781},">.HandleRequestAsync()  \n",[736,801,803],{"class":738,"line":802},4,[736,804,805],{"class":781},"Stack Query Cookies Headers Routing \n",[736,807,809],{"class":738,"line":808},5,[736,810,811],{"class":781},"WindowsCryptographicException: The system cannot find the file specified. System.Security.Cryptography.CngKey.Open(string keyName, \n",[736,813,815],{"class":738,"line":814},6,[736,816,817],{"class":781},"    CngProvider provider, CngKeyOpenOptions openOptions) \n",[736,819,821],{"class":738,"line":820},7,[736,822,823],{"class":781},"System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider) \n",[736,825,827,830,833,836,839,843,846,849,851],{"class":738,"line":826},8,[736,828,829],{"class":781},"Internal.Cryptography.Pal.CertificatePal.GetPrivateKey\u003C",[736,831,832],{"class":795},"T",[736,834,835],{"class":781},">(Func\u003C",[736,837,838],{"class":795},"CspParameters,",[736,840,842],{"class":841},"sScJk"," T",[736,844,845],{"class":781},"> createCsp, Func\u003C",[736,847,848],{"class":795},"CngKey,",[736,850,842],{"class":841},[736,852,853],{"class":781},"> createCng) \n",[736,855,857],{"class":738,"line":856},9,[736,858,859],{"class":781},"Internal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey() \n",[736,861,863],{"class":738,"line":862},10,[736,864,865],{"class":781},"System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() \n",[736,867,869],{"class":738,"line":868},11,[736,870,871],{"class":781},"Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey() \n",[736,873,875],{"class":738,"line":874},12,[736,876,877],{"class":781},"Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKeyStatus() \n",[736,879,881],{"class":738,"line":880},13,[736,882,883],{"class":781},"Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.FoundPrivateKey(SecurityKey key) \n",[736,885,887],{"class":738,"line":886},14,[736,888,889],{"class":781},"Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures) \n",[736,891,893],{"class":738,"line":892},15,[736,894,895],{"class":781},"Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures, \n",[736,897,899],{"class":738,"line":898},16,[736,900,901],{"class":781},"        CryptoProviderFactory cryptoProviderFactory) \n",[736,903,905],{"class":738,"line":904},17,[736,906,907],{"class":781},"Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, string algorithm, bool willCreateSignatures) \n",[736,909,911,914,917,920,923],{"class":738,"line":910},18,[736,912,913],{"class":781},"Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, string algorithm)  Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities.CreateEncodedSignature(string input, SigningCredentials signingCredentials) System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.WriteToken(SecurityToken token)  Sample.Idp.Startup+",[736,915,916],{"class":795},"\u003C",[736,918,919],{"class":781},">c__DisplayClass7_0.\u003C",[736,921,922],{"class":795},"ConfigureServices",[736,924,925],{"class":781},">b__8(AuthorizationCodeReceivedContext context) in Startup.cs\n",[736,927,929],{"class":738,"line":928},19,[736,930,931],{"class":781},"Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.AuthorizationCodeReceived(AuthorizationCodeReceivedContext context) Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt) \n",[736,933,935],{"class":738,"line":934},20,[736,936,937],{"class":781},"Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()\n",[939,940,941],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":11,"searchDepth":12,"depth":12,"links":943},[],"2020-05-08T18:24:50.164Z","\u002Farticles\u002Fimages\u002Fimage_thumb_637245590899400228.png",{},"\u002Farticles\u002Fwindowscryptographicexception-the-system-cannot-find-the-file-specified",{"title":717,"description":722},"articles\u002Fwindowscryptographicexception-the-system-cannot-find-the-file-specified",[18,951],"javascript","gbbOXSewTUn-I9zN11i80mm77-02qjY2Sj3AUb7gbjM",{"id":954,"title":955,"author":28,"body":956,"createdAt":1071,"description":1072,"extension":15,"img":1019,"meta":1073,"navigation":19,"path":1074,"seo":1075,"stem":1076,"tags":1077,"updatedAt":1071,"__hash__":1080},"articles\u002Farticles\u002Fancm-in-process-start-failure-shenanigans.md","ANCM InProcess Start Failure Shenanigans",{"type":8,"value":957,"toc":1069},[958,966,983,990,998,1001,1006,1008,1022,1025,1050,1053,1056,1066],[37,959,960,961,965],{},"If you are using .NET Core and have not received the following error\u002Fexception message I will send you $1.00.  Let me know!  ",[962,963,964],"b",{},"HTTP Error 500.30 - ANCM In-Process Start Failure","\nCommon solutions to this issue:",[68,967,968,970,972,977,979,981],{},[71,969,472],{},[71,971,475],{},[71,973,974,975],{},"The application started but threw an exception during startup   ",[962,976,483],{},[71,978,488],{},[71,980,491],{},[71,982,494],{},[37,984,985,986,989],{},"I have ran into this plenty of times already.  There are many reasons but at it’s root dotnet is not able to start up for one of many reasons.  As I run into my issues I will update this post with them.  So far, with ASP.NET Core 3.1.1  1. The IIS Application Pool – Advanced Settings “Enable 32-Bit Applications” – ",[58,987,988],{},"setting to False fixed my issue ","(this site was deployed to an on-premise IIS Server)  2. Azure installation – It was more difficult to identify the source of the issue as I was not working directly with IIS (Internet Information Server).  I first tried logging via App Service Logs,  and view the streaming logs which led me to error message similar to..",[37,991,992,997],{},[455,993,994,995],{},"”IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.\u003C\u002Fli>     \u003Cli>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.”",[47,996],{},"\nI then worked towards running the web application from command line to hope it gave me more information.\ni.e. Diagnostic Console – Debug Console then running the web assembly via “dotnet web.dll” (in this case my application was called Web). ",[37,999,1000],{},"This gave me a much better startup.cs issue. I had good sense to recognize the issue\u002Fexception was within my startup class. \nI had my first real clue from the following message…",[37,1002,1003],{},[455,1004,1005],{},"”Unhandled exception. System.IO.DirectoryNotFoundException: D:\\home\\site\\wwwroot\\Scripts\\ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at\nMicrosoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) at Web.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider serviceProvider, LinkGenerator lin”",[455,1007],{},[37,1009,1010],{},[455,1011,1012],{},[496,1013,1015],{"href":1014},"\u002Farticles\u002Fimages\u002Fimage_637160171567190817.png",[41,1016],{"title":45,"style":1017,"border":1018,"alt":45,"src":1019,"width":1020,"height":1021},"border: 0px currentcolor; border-image: none; display: inline; background-image: none;",0,"\u002Farticles\u002Fimages\u002Fimage_thumb_637160171568626232.png",722,343,[37,1023,1024],{},"I had used in prior 2.1 Core solution a scripts static directly which did not exist with this 3.1 solution.",[727,1026,1028],{"className":729,"code":1027,"language":731,"meta":11,"style":11},"app.UseStaticFiles(new StaticFileOptions   {    \nFileProvider = new PhysicalFileProvider\n(Path.Combine(Directory.GetCurrentDirectory(), \"Scripts\")),\nRequestPath = \"\u002FScripts\" });\n",[733,1029,1030,1035,1040,1045],{"__ignoreMap":11},[736,1031,1032],{"class":738,"line":739},[736,1033,1034],{},"app.UseStaticFiles(new StaticFileOptions   {    \n",[736,1036,1037],{"class":738,"line":12},[736,1038,1039],{},"FileProvider = new PhysicalFileProvider\n",[736,1041,1042],{"class":738,"line":415},[736,1043,1044],{},"(Path.Combine(Directory.GetCurrentDirectory(), \"Scripts\")),\n",[736,1046,1047],{"class":738,"line":802},[736,1048,1049],{},"RequestPath = \"\u002FScripts\" });\n",[37,1051,1052],{},"Once I removed this reference to \u002FScripts things worked and I was up and running. ",[37,1054,1055],{},"So, just note that this ANCM error is pretty good indication that something is wrong with Startup.cs class and so you really will be looking for logs for some indication as to what.",[37,1057,1058],{},[496,1059,1061],{"href":1060},"\u002Farticles\u002Fimages\u002Fimage_637160171569717383.png",[41,1062],{"title":45,"style":1017,"border":1018,"alt":45,"src":1063,"width":1064,"height":1065},"\u002Farticles\u002Fimages\u002Fimage_thumb_637160171570874206.png",534,256,[939,1067,1068],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":11,"searchDepth":12,"depth":12,"links":1070},[],"2020-01-30T21:39:17.213Z","Common issue with .net core solutions when you deploy to a server and get ANCM In-Process failures",{},"\u002Farticles\u002Fancm-in-process-start-failure-shenanigans",{"title":955,"description":1072},"articles\u002Fancm-in-process-start-failure-shenanigans",[18,1078,1079],"aspnet","netcore","uO_1neDf1NscBqxD75q-Jvy9EuQmMV849La98mkWnks",1781574758564]