Dew Drop – October 20, 2021 (#3541)

Top Links

Learn to build great Progressive Web Apps (Patrick Brosset)

Visual Studio 2022 Launch Event (Mark Downie)

Node.js 17 is here! (Bethany Griggs)

Microsoft Says ‘.NET 5/6 Will Not Be Coming to UWP Project Types,’ Developers Sound Off (David Ramel)

Web & Cloud Development

Azure Functions With .Net 5 – Execution On Isolated Process (Jorge Levy)

Detecting Specific Text Input with HTML and CSS (Louis Lazaris)

Easily Import and Export RTF Files in Blazor with Accuracy (Thangavel E)

Security.txt: Make Vulnerabilities Easier to Report (Brian Demers)

Building the Next Evolution of Cloud Networks at Slack – A Retrospective (Archie Gunasekara)

Getting Started with VMware Tanzu Community Edition (Boskey Savla)

A Tour Through the OWASP Top 10 (Chitra Dharmarajan)

@supports selector() (Chris Coyier)

Announcing the ORBIT dataset: Advancing real-world few-shot learning using teachable object recognition (Lexie Hagen)

Full-Stack Observability Essentials (Lindsay Smith)

Improving patient engagement and more in the latest Microsoft Cloud for Healthcare update (Satish Thomas)

Introduction to Progressive Web Apps (Tariq Siddiqui)

WinUI, .NET MAUI & XAML

11 Best UWP Books of All Time (Book Authority)

Discover the World of Features of RadMap for WinUI (Ivan Petrov)

Refactoring Facebook Profile UI in Xamarin Forms (Leomaris Reyes)

Microsoft Officially Deprecates UWP (Paul Thurrott)

LightningChart Introduces Uno Platform Support (Uno Platform Team)

MAUI Improves Android App Start Time (Kay Ewbank)

Visual Studio & .NET

Bulk Import Records Into SQLite With C# (Khalid Abuhakmeh)

Collection Performance: Creating New Sorted Collection From a Collection (David McCarter)

Supporting integration tests with WebApplicationFactory in .NET 6: Exploring .NET Core 6 – Part 6 (Andrew Lock)

Design, Methodology & Testing

3 ways to support frontline workers in a hybrid world (Emma Williams)

What Horror Movies Can Teach Us About UX Design (Suzanne Scacca)

5 JetBrains Plugins to Upgrade Your Built-In Git Support (Thomas Scott)

Mobile, IoT & Game Development

Android 12 Is Now Available For Pixel Phones (BeauHD)

Arm Looks to Supercharge IoT Software Development (Jeffrey Burt)

Swift For Android Makes Major Step Forward With SCADE 2.0 (Sergio De Simone)

Podcasts, Screencasts & Videos

Developer Tea – Can You Really Pick the Right Tool for Every Job? (Jonathan Cutrell)

RunAs Radio – From Citrix Cloud to Azure Virtual Desktop with Aidan Finn (Richard Campbell)

Armchair Architects: Resiliency in the Cloud: an Introduction | Azure Enablement Show (David Blank-Edelman, Uli Homann & Eric Charran)

LIVE: Modern Web Dev with Blazor and .NET 6 with Jason Taylor (SSW TV)

VS Code vs. Vim? (Scott Hanselman)

Asp.Net Monsters – Improved LINQ Methods in .NET 6 (James Chambers, Simon Timms & David Paquette)

Microsoft Cloud Show Episode 431 | Microsoft Teams, Acquisitions, Hololens, and the Disappearing Cloud (Andrew Connell & Chris Johnson)

Smashing Podcast Episode 42 With Jeff Smith: What Is DevOps? (Drew McLellan)

8 Bits with Brenden O’Leary (Pj Metz & Brandon Minnick)

How Fluent Are Your Assertions? – Adventures in .NET 091 (Caleb Wells & Shawn Clabough)

FreeCodeSession – Episode 308 (Jason Bock)

Community & Events

What’s new from GitHub Changelog? September 2021 recap (Sidi Merzouk)

Meet a recent Microsoft Learn Student Ambassador graduate: Aravind Venugopal (MS Student Developer Team)

Database

SQL SERVER – Converting Unix TimeStamp to DateTime (Pinal Dave)

Scaling your Azure SQL Managed Instance (Arun Sirpal)

SharePoint & MS Teams

New Microsoft 365 and Teams solutions to empower frontline workers (Microsoft Teams Team)

Simplifying the complex: Introducing Privacy Management for Microsoft 365 (Emma Jones)

Miscellaneous

Facebook is planning to rebrand the company with a new name (Alex Heath)

Releasing Windows 10 Build 19044.1319 (21H2) to Release Preview Channel and Releasing Windows 10 Build 19043.1319 (21H1) to Release Preview Channel (Brandon LeBlanc)

Universal Print support for Zero Trust networks (Jimmy Wu)

More Link Collections

The Morning Brew #3336 (Chris Alcock)

.NET App Developer Links – 2021-10-20 (Dan Rigby)

[Last Week in .NET #64 – Xamarin? What’s Xamarin?] (George Stocker)

The Wolf Report – October 20th, 2021 (Michael Wolfenden)

The Geek Shelf

 The DevOps Handbook: How to Create World-Class Agility, Reliability, and Security in Technology Organizations (Gene Kim & Patrick Debois) – Referral Link

8 Reasons to Use JavaScript Libraries in Project Management Apps

Software solutions help project managers to get ultimate control over all project stages and deliver results without delays. Since the war against the COVID-19 pandemic is not over yet,  many organizations around the world adhere to remote working and pay for technologies that allow project managers to collaborate with colleagues and keep projects on track from anywhere. According to Statista, this year enterprise software expenditures are expected to increase by 13.2% compared to 2020 and reach approximately 599 bln US dollars worldwide.

While it is hard to argue with the necessity to use software applications for effective project management, businesses frequently face a serious problem of choice: buying out-of-the-box software, creating their own custom solution from scratch, or embedding a JavaScript component?

In this article, let us consider the reasons to opt for custom project management solutions built with the help of JavaScript libraries.

Costly and obscure ready-made software 

With numerous unquestionable merits, off-the-shelf project management software can cause a lot of problems. Such products can be quite expensive and often lack the flexibility to meet all project requirements. Capterra’s latest PM software market research provides interesting insights related to challenges experienced with PM tools. For example, project teams frequently have to deal with such negative factors as the overall complexity of tools, many unused features, integration issues, and more.

Source: Capterra Project Management User Survey 2021

In light of these facts, it seems reasonable to make efforts to build your own application. That is why many companies prefer to invest in the development of their own project management tools.

Faster implementation of complex functionalities

The State of Project Management 2021 annual report conducted by Wellingtone says that businesses often suffer from poor resource management. Creating advanced functionalities from scratch to deal with management challenges is a painstaking and time-consuming task. Meanwhile, JavaScript components provide a wide range of useful built-in features such as task assignment, resource allocation, progress tracking, work time estimation, reporting, and much more. There are even specialized libraries like a JavaScript Scheduler or Gantt chart, which can serve as the foundation for the whole application. Therefore, if you want to save time and avoid unnecessary bugs, you’d better use JavaScript components for such undertakings.

Example of a JavaScript Scheduler (Timeline view) by DHTMLX

High performance and scalability

When working on a project management app, it is important to ensure that the final product operates well with large amounts of information without any performance deteriorations. It is one of the key metrics for a good user experience. JavaScript libraries usually come with special techniques such as smart rendering and dynamic loading that allow conveniently working with huge projects. Moreover, performant JS components can give you the scalability that you need to adjust your application for managing more complex business processes with time.

Personalized approach to user experience

Another important thing is customizability. Business-oriented JavaScript libraries are notable for rich and flexible APIs that enable developers to modify each and every element of the user interface. API methods and properties make it possible to determine the system’s behavior. Event listeners ensure that an app is fully interactive. Besides, you can easily adjust the appearance of JavaScript components via CSS to conform to your brand guidelines. 

Compatibility with popular JS frameworks and back-end technologies

Building a web application more and more often involves the use of JavaScript frameworks rather than vanilla JS. When talking about the most popular framework options, many developers will certainly mention the “Big Three” – React, Angular, and Vue. But new names also appear on the JavaScript landscape. Responders of the 2021 Developer Survey named Svelte the most loved front-end tool.

JS frameworks offer ready-to-use code for performing standard programming tasks much faster, thereby giving you more time for working on complex aspects of your project. And the great thing is that JS libraries can be seamlessly integrated into applications based on popular frameworks. Apart from that, modern JS libraries rely on REST API and can be used alongside any back-end technology such as Node.js, PHP, Ruby on Rails, ASP.NET, etc.

Exporting options 

It is very convenient for project managers to have important project data at hand. For instance, it may be needed to present printed project workflow or upcoming business activities at meetings or send the information by email. That is why JavaScript project management libraries allow converting data into such formats as PDF, PNG, Excel, etc. to handle projects more effectively.

It can also be very helpful to make your app compatible with Microsoft Project since it is a widely-used project management instrument. This feature is supported by some libraries such as DHTMLX JavaScript Gantt chart.

Example of a JavaScript Gantt chart by DHTMLX

Documentation and demos

A developer-friendly JavaScript library for project management usually comes with detailed and actively maintained documentation and demo materials. The benefits of good documentation are undeniable. It commonly provides guides, tutorials, API references, and other useful information that make it much easier to integrate necessary functions into your project. Code samples give you a clear idea of how to make the most of the library’s feature set.

Technical support & updates

No matter how skilled you are at JavaScript, at some point you will certainly require technical assistance. When using JS libraries, you can count on the help of technical specialists who have a profound knowledge of the tool and can quickly give you helpful recommendations on any questions. One more great advantage of JavaScript components is that they are regularly provided with bug fixes and updates enabling you to improve the quality of your application.

Final words

JavaScript libraries allow creating feature-rich project management applications that comply with your requirements faster. Custom solutions based on JS libraries can be a good alternative to costly prepackaged software. Such tools enable you to fully realize your vision in terms of functionality and design without any restrictions.

The post 8 Reasons to Use JavaScript Libraries in Project Management Apps appeared first on Flatlogic Blog.

Deploying PHP Applications to Azure App Service with Azure DevOps

This post is about deploying PHP applications to Azure App Service with Azure DevOps. Recently I had to deploy PHP application to Azure App Service. You can deploy it to Azure App Service using FTP, since there is no compilation steps required. If you’re using Composer – Dependency Manager for PHP, you need to run the composer install before deploying the files to app service via FTP. Instead of using deploying FTP deploy the app, I choose to implement a deployment pipeline, so that I don’t want to share the FTP credentials to the developer. And if I enable continuous integration – when ever developer commit some changes, can be deployed automatically to the app service.

In the Azure DevOps I used a classic editor option to create the pipeline. Firstly I created a pipeline with empty job since there is no predefined task available for PHP deployment. In the tasks I added first Bash script task – for running the command – composer install –no-interaction –prefer-dist. Next I added Archive files task. In this task make sure, un select the Prepend root folder name to archive paths option.

Next I am adding Publish Artifact task, so that I can publish the Zip file from the directory to the artifacts location. And finally I am adding Azure App Service deployment task. In the task you need to select the Package or folder as the $(Build.ArtifactStagingDirectory)/**/*.zip file – which the output of the Publish Artifact Task.

And you need to choose the Runtime Stack – 7.4 – the PHP runtime you would like to use. And here is the complete build pipeline.

And here is the YAML – Exported from Azure DevOps.

trigger:
branches:
include:
main
resources:
repositories:
repository: self
type: git
ref: main
jobs:
job: Job_1
displayName: Agent job 1
pool:
vmImage: ubuntu-20.04
steps:
checkout: self
clean: true
task: [email protected]
displayName: Composer Install
inputs:
targetType: inline
script: composer install –no-interaction –prefer-dist
task: [email protected]
displayName: Archive $(System.DefaultWorkingDirectory)
inputs:
rootFolderOrFile: $(System.DefaultWorkingDirectory)
includeRootFolder: false
task: [email protected]
displayName: Publish Artifact: drop’
task: [email protected]
displayName: Azure App Service Deploy: Php Web App’
inputs:
ConnectedServiceName: 643990e2-059d-4e5a-87e0-e9484682897e
WebAppKind: webAppLinux
WebAppName: azure-php-web-app
Package: $(Build.ArtifactStagingDirectory)/**/*.zip
RuntimeStack: PHP|7.4

Here few helpful links which talks about deploying PHP apps to Azure App Service.

Build and test PHP apps
Build and deploy to a PHP web app

Happy Programming 🙂

Laravel Installation

Laravel is an open-source widely used PHP framework for web applications development. 

In this article, we will see Laravel 8 installation. In this tutorial, I will show you step-by-step complete processes like system requirements and installation of Laravel 8.

Let’s get started.

System Requirements – Laravel 8 Framework

To develop a Laravel application, we should have some PHP configuration on our system. 
So, before going to Laravel 8 installation, we make sure the following configuration is already in our system.

PHP & Server Configuration
Composer 

Composer Installation

Step 1 − Visit the following URL and download composer to install it on your system.

https://getcomposer.org/download/

OR

To install it, open up a terminal and cd into a new directory. Run this command:

curl -Ss getcomposer.org/installer | php

Laravel 8 Installation

Step 2 − After the Composer is installed, check the installation by typing the Composer command in the command prompt as shown in the following screenshot.

Open up Command Prompt and type 

composer -v

If it is installed in your system, you will see the version number.

Step 3 − Create a new directory anywhere in your system for your new Laravel project.
After that, move to the path where you have created the new directory and type the following command there to install Laravel on your development system.

Syntax:  

composer create-project –prefer-dist laravel/laravel <project-name>

Example:

composer create-project –prefer-dist laravel/laravel laravel-demoapp  

Step 4 − The above command will install Laravel in the current directory.
Go to the project folder using the command prompt and Start the Laravel service by executing the following command.

php artisan serve

Step 5 – After executing the above command, you will see a screen as shown below
http://127.0.0.1:8000

Step 6 − Copy the URL in the above screenshot and open that URL in the browser.
If you see the following screen, it implies Laravel has been installed successfully.

I hope this article helped you to learn Laravel 8 Installation in the system.

The post Laravel Installation appeared first on PhpCluster.

Asynchronous Pre-Request script in #Postman

A Pre-request script in Postman allows you to dynamically change the request body based on any JavaScript function you provide, this sometimes is done to dynamically calculate HMACs in the request, such that you don’t have to manually calculate it before every request.

However, it’s not obvious how to create an asynchronous pre-request script, that is one that does not return instantly, but has to wait for some external factor (i.e. a HTTP Request), before completing the main request.

Here is the simple example, where we want to inject the user’s IP address into the HTTP request body before sending; as follows –

new Promise(resolve =>

pm.sendRequest(“http://checkip.amazonaws.com/”,function(e, r){
pm.request.body.update(JSON.stringify(r.text()));
resolve();
})

);

And, the main request will not execute until the promise returned in the pre-request script is resolved.

Dew Drop – October 19, 2021 (#3540)

Top Links

Help Decide What Questions We’ll Answer at the .NET Foundation Face-to-Face Meeting (Shawn Wildermuth)

UWP to Windows App SDK: Overall migration strategy (Steven White)

The 6 Figure Developer Episode 216 – Visual Studio 2022 with Mads Kristensen (John Callaway)

Developing for Windows with the Windows App SDK (Thomas Fennel)

F# Advent Calendar in English 2021 (Sergey Tihon)

Web & Cloud Development

Azure Cloud Shell issue when using CLI for Microsoft 365 – Workaround (Arjun Menon)

How to Fill an Array with Initial Values in JavaScript (Dmitri Pavlutin)

WebStorm 2021.2.3 Is Available (Ekaterina Ryabukha)

Azure Exam DP-420: Study Guide Designing and Implementing CloudNative Applications Using Microsoft Azure Cosmos DB (Beta) (Gregor Suttie)

OCR (Read) supports 122 languages in the Cognitive Services Computer Vision public preview (Azure Team)

Introducing Pulumi Registry: your window to the cloud (Alex Mullans)

OpenAPI and GraphQL: The Chunnel Problem (Anant Jhingran)

Controlling a WSL installation of redis-server from the Windows command line (Chris Miller)

An Introduction to File Handling in Go (Manoj Debnath)

Getting the working hours/time zones for other users using Microsoft Graph API (Michel Carlo)

Web Apps vs. Native Apps: The Growth of Progressive Web Apps (Richard MacManus)

WinUI, .NET MAUI & XAML

Lagging .NET MAUI Preview 9 Updates Controls and Supports Borders, Corners and Shadows (David Ramel)

Windows App SDK Preview 1 & 2: PATH Environment Variable Corruption Issue (andreww-msft)

.NET MAUI Preview 9: Borders, Corners, Shadows and Performance Improvements and Present and Future of Xamarin Community Toolkit: Q&A with Gerald Versluis (Almir Vuk)

Create, Edit, and Delete Arrows Shapes in PDF Files with Ease in WPF (Deepak G)

Visual Studio & .NET

C# Tip: use the Ping class instead of an HttpClient to ping an endpoint (Davide Bellone)

Visual Studio 2022 Launch Event and Preview 5 (Jason Gaylord)

Bite-Size .NET 6 – LINQ OrDefault() Overloads (Matthew Jones)

Unit Testing Azure Microservices in Visual Studio (Peter Vogel)

Collection Performance: Creating new collection From a collection Using AddRange() (David McCarter)

How can I get the screen reader to read out an error message that I displayed inline on a page? (Raymond Chen)

ETW Host Service Installation Changes in 2021.3 (Khalid Abuhakmeh)

Design, Methodology & Testing

Finding a bug with code that isn’t there (Oren Eini)

How to Find the Right Collaborative Coding Tool for Remote Pair Programming (Brian Fernandes)

Get career advice from 7 inspiring leaders in cybersecurity (Emma Jones)

Grow your skills and advance your career with security training from Microsoft Learn (Gita Sharma)

Code quality: a concern for businesses, bottom lines, and empathetic programmers (Isaac Lyman)

How to Manage Access to Projects and Git Repositories – Demystifying Space Permissions (Maarten Balliauw)

Is Agility Related to Commitment? – Money Flows Part II (Ian Miell)

Mobile, IoT & Game Development

What’s New in Flutter Slider and Range Slider: 2021 Volume 3 (Meikanda Nayanar I)

This Raspberry Pi add-on lets you control Lego robots (Mitchell Clark)

Release: React Native Windows 0.66.0 (React Native for Windows Team)

Space Cadet Pinball for Windows 95 recompiled for Linux running on Windows 11 as a Linux app under WSLg (Scott Hanselman)

Podcasts, Screencasts & Videos

Syntax Podcast – Hasty Treat – Handy Utility Functions with Just (Wes Bos)

Revision Path – Brian A. Thompson (Maurice Cherry)

Software Engineering Daily – Developer Relations at Google with Luke Mahe (Jeff Meyerson)

InfoQ Podcast: Domain Storytelling with Stefan Hofer and Henning Schwentner (Stefan Hofer & Henning Schwentner)

.NET MAUI Preview 9: Borders, Corners and Shadows on Everything! (Gerald Versluis)

The Stack Overflow Podcast 385:  Getting your first job off the CSS mailing list (Ben Popper)

Dan Patrick on Securing Azure Deployment – Azure DevOps Podcast Episode 163 (Jeffrey Palermo)

Basics for Accessible Writing (Rebecca Jackson)

Oracle Groundbreakers Podcast – Oracle ACE Director Francisco Alvarez Munoz Previews the 2021 Oracle Groundbreakers APAC Virtual Tour (Bob Rhubart)

Microsoft 365 Dev Podcast – yo Teams Generator Update with Wictor Wilén (Jeremy Thake & Paul Schaeflein)

ID10T Podcast – Danny Elfman (Chris Hardwick)

Google Cloud Security Podcast Episode 39 – From False Positives to Karl Popper: Rationalizing Cloud Threat Detection (Anton A. Chuvakin)

AWS Developers Podcast Episode 016 – Learn and Be Curious with Marcia Villalba (David Isbitski)

The Amp Hour #562 – Electroboom! (Dave Jones & Chris Gammell)

Radical Candor S3, Ep. 11: How to Encourage Feedback Between Others (Kim Scott, Jason Rosoff & Amy Sandler)

Inside Trader Joe’s Podcast Episode 41: Value. Always Value at Trader Joe’s (Trader Joe’s Team)

Microsoft 365 PnP Weekly – Episode 139 – André Lage (Datalynx AG) (Vesa Juvonen & Waldek Mastykarz)

Community & Events

Microsoft Ignite 2021 guide to SharePoint, OneDrive, Viva, Lists, Planner, Stream, Visio and more (Mark Kashman)

Peeking Behind the Scenes of Facebook Open Source (Kairsten Fay)

Meet the GitHub Universe hosts, and start building your schedule (Kelsey Bernius)

Database

SQL SERVER – Source Database in Restoring State (Pinal Dave)

Where Should I Put My Data in Azure (Frank Boucher )

Safe schema updates – Provisioning dev/test databases (Alex Yates)

SharePoint & MS Teams

New ways for Cloud Storage Partners to integrate their services with Microsoft Teams and Office (Ben Summers)

SharePoint Adaptive Scope Retention Label Policy | A Walk-thru (Joanne Klein)

Connecting to SharePoint Online to On-Premises Databases with SharePoint Framework (Simon Doy)

PowerShell

Microsoft tells sysadmins to update PowerShell 7 to fix flaw that could expose credentials in Linux (Sofia Wyciślik-Wilson)

A closer look at the Crescendo configuration (Sean Wheeler)

Miscellaneous

The new MacBook Pro highlights what’s gone wrong with Windows laptops (Adrian Kingsley-Hughes)

10 tips for using Windows 11 to get closer to what you love (Athima Chansanchai)

How to Join the Windows Insider Program and Upgrade Your Device (Michael Reinders)

Apple Introduces M1 Pro and M1 Max (msmash)

Apple’s Long Journey to the M1 Pro Chip (Steven Sinofsky)

10 Books Every New Software Developer Should Read (Tanaka Mutakwa)

More Link Collections

The Morning Brew #3335 (Chris Alcock)

Sands of MAUI: Issue #29 (Sam Basu)

The Wolf Report – October 18th, 2021 and The Wolf Report – October 19th, 2021 (Michael Wolfenden)

Weekly Xamarin – Issue 324 – 19th Oct 2021 (Kym Phillpotts)

The Geek Shelf

 Learn WinUI 3.0: Leverage the power of WinUI, the future of native Windows application development (Alvin Ashcraft)

Help Decide What Questions We’ll Answer at the Face-to-Face Meeting

With the Face-to-Face meeting coming up next week, we wanted to help get the important discussions started. To that end, we’re opening up a place to put your questions and have the community vote the most important ones to ask with our limited time.

To add your questions and vote, please visit:

https://bit.ly/dnf-facetoface

We’re using this method to gather the questions that are most important to the community. This will become the list of questions from the community on the day of the Face-to-Face events. While we still will be monitoring the chat, we wanted a way for the community to help us field the right and most important questions. Please help us do that.

Don’t forget to join us for the Face-to-Face meeting which you can join on YouTube:

12pm ET/9am PT/5pm GMT
https://www.youtube.com/watch?v=zK-_Lq8d1h8

8pm ET/5pm ET/11am AET/8am AWT
https://www.youtube.com/watch?v=IGB-p-IOpJk
Note: Oceania/Asia time zones are +1 day (e.g. Oct 28th)

I look forward to your questions!

Shawn Wildermuth
.NET Foundation

Dew Drop – October 18, 2021 (#3539)

Top Links

PATH Corruption with Windows App SDK preview 1 and 2 (Nick Randolph)

Technology & Friends – Richard Campbell on the Future of Space Travel (David Giard)

Creating Microsoft Teams meetings in ASP.NET Core using Microsoft Graph application permissions part 2 (Damien Bowden)

Using .NET MAUI Community Toolkit (Brandon Minnick)

Web & Cloud Development

As .NET 6 Nears GA, Blazor WebAssembly Can Now Use Native Dependencies (David Ramel)

Exploring the Auth0 ASP.NET Core Authentication SDK (Andrea Chiarelli)

Vue vs. React: Which Is the Best JavaScript Framework in 2021 (Devesh Chauhan)

The Newbies Guide to jQuery (Janus Atienza)

Structured data, SEO and React (John Reilly)

Introducing the new Azure SDK Resource Management Libraries for .NET (Michael Nash)

Angular Basics: Data Binding Part 7—Output Decorator (Nwose Lotanna Victor)

Best Practices for Vue Developers in 2021 (Chris Bannon)

JavaScript and .NET Spreadsheet Tips and Tricks: SEQUENCE Function (Sean Lawyer)

PhpStorm 2021.2.3 is released (Roman Pronskiy)

Adding User Profiles to Static Web Apps (Aaron Powell)

Open Any Supported Document Without Knowing the Extension (Bjoern Meyer)

Spooky: Enhancing Dark Mode in Chromium (Eric Lawrence)

Custom properties with defaults: 3+1 strategies (Lea Verou)

WinUI, .NET MAUI & XAML

Masks with Plugin.ValidationRules in Xamarin.Forms (Luis Matos)

New WinUI Segmented Control Is Here! (Mageshyadav)

Visual Studio & .NET

IAsyncEnumerable with yield in C# (Muhammed Saleem)

Collection Performance: Creating A New List Or Linkedlist While Adding Items Using The Constructor (David McCarter)

7 Visual Studio 2022 Features That Will Change Your Life (Michelle Sebek)

A Race Condition in .NET Finalization and its Mitigation for C++/CLI (Tanveer Gani)

A Dozen Utilities I Use Every Day (Jesse Liberty)

Design, Methodology & Testing

DZone Refcard #346 – Microservices and Workflow Engines (Amy Johnston)

How to Edit an MSI Package (Alex Marin)

Lead Your Team Like A Boss: 6 Team Management Trello Templates (Britt Joiner)

Get Git in 45 Minutes (Jesse Liberty)

How To Understand Your Team Type: Collocated, Satellite, Cluster, Nebula (Johanna Rothman)

Early Evaluator, Late Adopter (Mark Heath)

5 Types of Software Testing Models (Twisa Mistry)

Hosted Pipelines Image Deprecation (Eric van Wijk)

Mobile, IoT & Game Development

Learn Flutter for free with Flutter Apprentice! (Shams Zakhour)

Windows for IoT now goes to 11 with Windows 11 IoT Enterprise (Joe Coco)

Podcasts, Screencasts & Videos

Merge Conflict 276: .NET 6 + C# 10 == Mind Blown (James Montemagno & Frank Kreuger)

Automate threat response with Azure Sentinel | Azure Friday (Scott Hanselman & Sarah Young)

InfoQ Podcast: Growing Teams and Retaining Culture in Remote Health Care (Damon Lanphear)

Meta Cast Episode 208 – You Need A Coach Too! (Bob Galen & Josh Anderson)

UI Breakfast Episode 224: Service Design with Eleni Stathoulis (Jane Portman)

FreeCodeSession – Episode 307 (Jason Bock)

Serverless Chats Episode #115: Serverless Complexity with Ant Stanley (Jeremy Daly & Rebecca Marshburn)

Talk Python to Me #338: Using cibuildwheel to manage the scikit-HEP packages (Michael Kennedy)

Azure Podcast Episode 398 – Hear ye! Hear ye! (Sujit D’Mello)

Community & Events

Upcoming Event! Developing Real-Time Collaborative Apps with Azure, Microsoft 365, Power Platform, and Github (Dan Wahlin)

SIGNAL Developer Mode 2021 (Dominik Kundel)

Save the date for GitHub Game Off 2021 (Lee Reilly)

Top Performing Arts Shows in Greater Philadelphia for Fall & Winter 2021/2022 and Eight Spots for Apple Picking, Scarecrows & Hayrides in Greater Philadelphia (Visit Philly)

Database

Simple way to create a SQL Server Job Using T-SQL (Daniel Calbimonte)

When you want to store, index and search MBs of text inside of RavenDB (Oren Eini)

SharePoint & MS Teams

Viva Topics brings new integrations with Yammer (Chris McNulty)

Miscellaneous

Releasing Windows 11 Build 22000.282 to Beta and Release Preview Channels (Brandon LeBlanc)

Windows 11’s new emoji isn’t as 3D as Microsoft promised (Tom Warren)

More Link Collections

The Morning Brew #3334 (Chris Alcock)

.NET App Developer Links – 2021-10-18 (Dan Rigby)

C# Digest Issue #385 (Jakub Chodounsky)

F# Weekly #42, 2021 – .NET 6 RC2 and What’s new in F# 6.0 (Sergey Tihon)

Top Stories from the Microsoft DevOps Community – 2021.10.15 (Jay Gordon)

DevOps Links for 15/10/2021 (Mitul Suthar)

Code Maze Weekly #97 (Vladimir Pecanac)

The Overflow #95: Image search, but for any object IRL (Ryan Donovan & Cassidy Williams)

The .NET Stacks #66: Who moved my cheese? (Dave Brock)

Friday Five: Power BI, Windows 11, And More! (Jeffrey Raymond Kitt)

The Geek Shelf

 Microsoft Azure Architect Technologies and Design Complete Study Guide: Exams AZ-303 and AZ-304 (William Panek & Benjamin Perkins) – Referral Link

Creating Microsoft Teams meetings in ASP.NET Core using Microsoft Graph application permissions part 2

This article shows how to create Microsoft Teams meetings in ASP.NET Core using Microsoft Graph with application permissions. This is useful if you have a designated account to manage or create meetings, send emails or would like to provide a service for users without an office account to create meetings. This is a follow up post to part one in this series which creates Teams meetings using delegated permissions.

Code: https://github.com/damienbod/TeamsAdminUI

Blogs in this series

Creating Microsoft Teams meetings in ASP.NET Core using Microsoft Graph (delegated)

Setup Azure App registration

A simple ASP.NET Core application with no authentication was created and implements a form which creates online meetings on behalf of a designated account using Microsoft Graph with application permissions. The Microsoft Graph client uses an Azure App registration for authorization and the client credentials flow is used to authorize the client and get an access token. No user is involved in this flow and the application requires administration permissions in the Azure App registration for Microsoft Graph.

An Azure App registration is setup to authenticate against Azure AD. The ASP.NET Core application will use application permissions for the Microsoft Graph. The listed permissions underneath are required to create the Teams meetings OBO and to send emails to the attendees using the configuration email which has access to office.

Microsoft Graph application permissions:

User.Read.All
Mail.Send
Mail.ReadWrite
OnlineMeetings.ReadWrite.All

This is the list of permissions I have activate for this demo.

Configuration

The Azure AD configuration is used to get a new access token for the Microsoft Graph client and to define the email of the account which is used to create Microsoft Teams meetings and also used to send emails to the attendees. This account needs an office account.

“AzureAd”: {
“TenantId”: “5698af84-5720-4ff0-bdc3-9d9195314244”,
“ClientId”: “b9be5f88-f629-46b0-ac4c-c5a4354ac192”,
// “ClientSecret”: “add secret to the user secrets”
“MeetingOrganizer”: “–your-email-for-sending–”
},

Setup Client credentials flow to for Microsoft Graph

A number of different ways can be used to authorize a Microsoft Graph client and is a bit confusing sometimes. Using the DefaultCredential is not really a good idea for Graph because you need to decide if you use a delegated authorization or a application authorization and the DefaultCredential will take the first one which works and this depends on the environment. For application authorization, I use the ClientSecretCredential Identity to get the service access token. This requires the .default scope and a client secret or a client credential. Using a client secret is fine if you control both client and server and the secret is stored in an Azure Key Vault. A client certificate could also be used.

private GraphServiceClient GetGraphClient()
{
string[] scopes = new[] { “https://graph.microsoft.com/.default” };
var tenantId = _configuration[“AzureAd:TenantId”];

// Values from app registration
var clientId = _configuration.GetValue<string>(“AzureAd:ClientId”);
var clientSecret = _configuration.GetValue<string>(“AzureAd:ClientSecret”);

var options = new TokenCredentialOptions
{
AuthorityHost = AzureAuthorityHosts.AzurePublicCloud
};

// https://docs.microsoft.com/dotnet/api/azure.identity.clientsecretcredential
var clientSecretCredential = new ClientSecretCredential(
tenantId, clientId, clientSecret, options);

return new GraphServiceClient(clientSecretCredential, scopes);
}

The IConfidentialClientApplication interface could also be used to get access tokens which is used to authorize the Graph client. A simple in memory cache is used to store the access token. This token is reused until it expires or the application is restart. If using multiple instances, maybe a distributed cache would be better. The client uses the https://graph.microsoft.com/.default&#8221; scope to get an access token for the Microsoft Graph client. A GraphServiceClient instance is returned with a value access token.

public class ApiTokenInMemoryClient
{
private readonly IHttpClientFactory _clientFactory;
private readonly ILogger<ApiTokenInMemoryClient> _logger;

private readonly IConfiguration _configuration;
private readonly IConfidentialClientApplication _app;
private readonly ConcurrentDictionary<string, AccessTokenItem> _accessTokens = new();

private class AccessTokenItem
{
public string AccessToken { get; set; } = string.Empty;
public DateTime ExpiresIn { get; set; }
}

public ApiTokenInMemoryClient(IHttpClientFactory clientFactory,
IConfiguration configuration, ILoggerFactory loggerFactory)
{
_clientFactory = clientFactory;
_configuration = configuration;
_logger = loggerFactory.CreateLogger<ApiTokenInMemoryClient>();
_app = InitConfidentialClientApplication();
}

public async Task<GraphServiceClient> GetGraphClient()
{
var result = await GetApiToken(“default”);

var httpClient = _clientFactory.CreateClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, result);
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(“application/json”));

var graphClient = new GraphServiceClient(httpClient)
{
AuthenticationProvider = new DelegateAuthenticationProvider(async (requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue(“Bearer”, result);
await Task.FromResult<object>(null);
})
};

return graphClient;
}

private async Task<string> GetApiToken(string api_name)
{
if (_accessTokens.ContainsKey(api_name))
{
var accessToken = _accessTokens.GetValueOrDefault(api_name);
if (accessToken.ExpiresIn > DateTime.UtcNow)
{
return accessToken.AccessToken;
}
else
{
// remove
_accessTokens.TryRemove(api_name, out _);
}
}

_logger.LogDebug($”GetApiToken new from STS for {api_name}”);

// add
var newAccessToken = await AcquireTokenSilent();
_accessTokens.TryAdd(api_name, newAccessToken);

return newAccessToken.AccessToken;
}

private async Task<AccessTokenItem> AcquireTokenSilent()
{
//var scopes = “User.read Mail.Send Mail.ReadWrite OnlineMeetings.ReadWrite.All”;
var authResult = await _app
.AcquireTokenForClient(scopes: new[] { “https://graph.microsoft.com/.default” })
.WithAuthority(AzureCloudInstance.AzurePublic, _configuration[“AzureAd:TenantId”])
.ExecuteAsync();

return new AccessTokenItem
{
ExpiresIn = authResult.ExpiresOn.UtcDateTime,
AccessToken = authResult.AccessToken
};
}

private IConfidentialClientApplication InitConfidentialClientApplication()
{
return ConfidentialClientApplicationBuilder
.Create(_configuration[“AzureAd:ClientId”])
.WithClientSecret(_configuration[“AzureAd:ClientSecret”])
.Build();
}
}

OnlineMeetings Graph Service

The AadGraphApiApplicationClient service is used to send the Microsoft Graph requests. This uses the graphServiceClient client with the correct access token. The GetUserIdAsync method is used to get the Graph Id using the UPN. This is used in the Users API to run the requests with the application scopes. The Me property is not used as this is for delegated scopes. We have no user in this application. We run the requests as an application on behalf of the designated user.

public class AadGraphApiApplicationClient
{
private readonly IConfiguration _configuration;

public AadGraphApiApplicationClient(IConfiguration configuration)
{
_configuration = configuration;
}

private async Task<string> GetUserIdAsync()
{
var meetingOrganizer = _configuration[“AzureAd:MeetingOrganizer”];
var filter = $”startswith(userPrincipalName,'{meetingOrganizer}’)”;
var graphServiceClient = GetGraphClient();

var users = await graphServiceClient.Users
.Request()
.Filter(filter)
.GetAsync();

return users.CurrentPage[0].Id;
}

public async Task SendEmailAsync(Message message)
{
var graphServiceClient = GetGraphClient();

var saveToSentItems = true;

var userId = await GetUserIdAsync();

await graphServiceClient.Users[userId]
.SendMail(message, saveToSentItems)
.Request()
.PostAsync();
}

public async Task<OnlineMeeting> CreateOnlineMeeting(OnlineMeeting onlineMeeting)
{
var graphServiceClient = GetGraphClient();

var userId = await GetUserIdAsync();

return await graphServiceClient.Users[userId]
.OnlineMeetings
.Request()
.AddAsync(onlineMeeting);
}

public async Task<OnlineMeeting> UpdateOnlineMeeting(OnlineMeeting onlineMeeting)
{
var graphServiceClient = GetGraphClient();

var userId = await GetUserIdAsync();

return await graphServiceClient.Users[userId]
.OnlineMeetings[onlineMeeting.Id]
.Request()
.UpdateAsync(onlineMeeting);
}

public async Task<OnlineMeeting> GetOnlineMeeting(string onlineMeetingId)
{
var graphServiceClient = GetGraphClient();

var userId = await GetUserIdAsync();

return await graphServiceClient.Users[userId]
.OnlineMeetings[onlineMeetingId]
.Request()
.GetAsync();
}

private GraphServiceClient GetGraphClient()
{
string[] scopes = new[] { “https://graph.microsoft.com/.default” };
var tenantId = _configuration[“AzureAd:TenantId”];

// Values from app registration
var clientId = _configuration.GetValue<string>(“AzureAd:ClientId”);
var clientSecret = _configuration.GetValue<string>(“AzureAd:ClientSecret”);

var options = new TokenCredentialOptions
{
AuthorityHost = AzureAuthorityHosts.AzurePublicCloud
};

// https://docs.microsoft.com/dotnet/api/azure.identity.clientsecretcredential
var clientSecretCredential = new ClientSecretCredential(
tenantId, clientId, clientSecret, options);

return new GraphServiceClient(clientSecretCredential, scopes);
}
}

The startup class adds the services as required. No authentication is added for the ASP.NET Core application.

public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<AadGraphApiApplicationClient>();
services.AddSingleton<ApiTokenInMemoryClient>();
services.AddScoped<EmailService>();
services.AddScoped<TeamsService>();
services.AddHttpClient();
services.AddOptions();

services.AddRazorPages();
}

Azure Policy configuration

We need to allow applications to access online meetings on behalf of a user with this setup. This is implemented using the following documentation:

https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy

Testing

When the application is started, you can create a new Teams meeting with the required details. The configuration email must have an account with access to Office and be on the same tenant as the Azure App registration setup for the Microsoft Graph application permissions. The Email must have a policy setup to allow the Microsoft Graph calls. The Teams meeting is organized using the identity that signed in because we used the applications permissions.

This works really well and can be used for Azure B2C solutions as well. If possible, you should only use delegated scopes in the application, if possible. By using application permissions, the ASP.NET Core is implicitly an administrator of these permissions as well. It would be better if user accounts with delegated access was used which are managed by your IT etc.

Links:

https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings

https://github.com/AzureAD/microsoft-identity-web

Send Emails using Microsoft Graph API and a desktop client

https://www.office.com/?auth=2

https://aad.portal.azure.com/

https://admin.microsoft.com/Adminportal/Home

https://blazorhelpwebsite.com/ViewBlogPost/43

Migrating ActiveX FarPoint Spread Grid Designer

FarPoint Spread ActiveX grid control was a very popular component for VB6 applications. However, because it stores design information in a proprietary, migrating can be difficult. The VBUC doesn’t understand how to deal with this proprietary binary format. Let’s discuss how to address this issue.

In this blog, we’ll demonstrate a way to import the designer for ActiveX FarPoint grids into Mobilize FpSpread Helper component.

Exporting the ActiveX Designer

First of all, use the FarPoint Spread functionality in VB6 to export the design information: right click on the grid, open the designer, and then select the File.Save As option)

This generate a file in a propietary binary format with extension “.ss2”.

Importing Designer in .Net

As FarPoint components are migrated to a FpSpread component that inherits from FarPoint.Win.Spread.FpSpread. This component is a Mobilize helper class that provides functionality no longer present in the .NET version of the FarPoint control, but was provided by the ActiveX version.

.NET FarPoint component offers a Designer that allows importing “old” designer files (like the stored in .ss2 files), but this feature is not available for inherited controls. So we can’t use that as a workaround.

Since we can’t import the original designer files, how can we migrate our component?

Converting a FarPoint Designer to XML

Open the ss2 file format using the GrapeCity Spread designer. This EXE file is located under the bin folder where the SreadNET component is installed.

The new designer lets see how the grid looked in VB6:

Now, go to File->Save As  and choose a new file name for the file where you want to save the new format of the grid designer file. Be sure to save this as an XML file type.

In the migrated code you can use FarPoint.Win.Spread.Model.SpreadSerializer.OpenXml static method to load the XML generated in the previous step and load the designer in the migrated FPSpread control:

FarPoint.Win.Spread.Model.SpreadSerializer.OpenXml(fpSpread1, @”C:Tempgrid.xml”);

When the code is executed, it loads and displays the grid designer in the upgraded FPSpread control.

And there it is! You’ve updated the grid control without the need to start from scratch building a new one.