DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • 6 of the Best API Testing Tools in the Market
  • How to Select an API Management Platform for Your Business
  • Alexa Skill With .NET Core
  • Angular Tutorial: Angular 7 and the RESTEasy Framework

Trending

  • DevSecOps: Integrating Security Into Your DevOps Workflow
  • AWS Amplify: A Comprehensive Guide
  • LLMs for Bad Content Detection: Pros and Cons
  • Selecting the Right Automated Tests
  1. DZone
  2. Data Engineering
  3. Databases
  4. Microsoft IIS Administration Rest API on Azure VMs

Microsoft IIS Administration Rest API on Azure VMs

In this article, learn how to get started with managing IIS using Microsoft IIS Administration REST API on Azure Virtual Machines.

Kasam Shaikh user avatar by
Kasam Shaikh
·
Nov. 16, 16 · Tutorial
Like (1)
Save
Tweet
Share
3.43K Views

Join the DZone community and get the full member experience.

Join For Free

https introduction

in this article, i will teach you about getting started with managing iis using microsoft iis administration rest api on azure virtual machines in very simple steps.

prerequisites

  • microsoft azure account
  • azure virtual machine (we will be using azure vm for this article)
  • iis 7.5 and above being enabled
  • .net core

note: ensure enabling iis before installing .net core in order to receive asp.net core module.

overview

the genesis of developing rest api for managing iis was nano server. if you have a newly named nano server, then in simple terms, it's windows server 2016, a slimmed-down version of windows server. inet-manager, religiously being used to manage iis, for some reason doesn’t work for nano server. this made the iis team need to work on a way to open up the iis configuration system.

microsoft administration api for iis was developed as an asp.net core application, which allows you to leverage the merits of the web api conventions that mvc framework offers. in order to allow the user to configure iis round the clock whenever required, it was necessary to run the application as a service.

iis team took advantage of hostable web core, a technology that allows the consumer to have an in-process version of iis to enable required api behavior. once hwc gets loaded, the process has access to all the capabilities iis offers. as hwc uses its own applicationhost.config file, any configuration changes made to iis does not affect the action of the service using hwc.

https

to express in simpler terms, microsoft iis administration is a self-hosted windows service that exposes all the functionality of underlying iis over to restful api.

microsoft iis administration api recently had its first preview release. the preview can be experienced by visiting this site .

let’s get started!

open this site on your azure virtual machine. an application with the screen mentioned below will be displayed.

now, this application is designed and developed to manage your iis machines running microsoft administration api. this application is accessible from anywhere through the web browser. if it’s mobile, tablet, or desktop, you can manage your machines right from anywhere across the globe. doesn’t that sound fantastic!

the application is in preview and the iis team has to ensure that they add more cool features with further releases.

the welcome screen being displayed allows you to download microsoft iis administration api, which is very much-needed by the application in order to run.

click download microsoft iis administration and follow the installer to get api installed https

note: if you already have the api installed, then you can skip the download and directly move to the connection screen.

once you've clicked download , the screen will appear with the message, shown below, along with an in-progress gif icon.

open the iis adminsitrationsertup.exe file to download it.

https

https

follow the instruction. click run .

https

check the i agree checkbox once you read the terms and the condition thoroughly.

click install .

this installation will take a few minutes depending upon certain iis features being enabled on your machine. if iis windows authentication and iis hostable web core are not enabled, then the installer will enable them.

the window shown below will be displayed after successful installation.

https

you can check the service running in the services window (open using the services.msc command), as highlighted below.

https

after successful installation, the application will prompt you to enter your machine credentials and it will keep prompting whenever it will try to talk with machine iis.

currently, only administrator group members and iis administrator groups have access to manage iis using the administration api.

https

after validating the credentials on the connection screen the screen shown below will be displayed. the connection screen is filled with some default names for the local machine. as seen, you need to generate the access token in order to get connected and talk with the api.

click get access token .
https

click create access key .

https

enter the required information, along with selecting the validity of token from the options, mentioned below.

here, i have selected only one day as its validity.

click create it .

https

the token will be generated, as shown below.

https

you can also refresh or delete the token with the provided option as highlighted in the image below. as you can see, it will display a few details of the token being generated along with the time remaining for it to be expired.

https

coming back to the connection page, enter the token generated in the access token field.

you can check an option for having a token stored locally. go for this option only if you’re accessing it through the private device.

once all the data is entered, click connect .
https

now, you are connected with your machine iis, as shown below. all of the websites configured in your machine will be displayed here.

you can perform all the activities related to iis configuration, like stopping the application, starting the application, changing app pool, restarting app-pool and many other from this ui.

let’s create a website in azure virtual machine through this application.

click create web site , as highlighted in the image below.

https

enter the required details as shown below:

name : name of the website.

physical path : its physical file location.

application pool : bindings, if any.

you can also select from existing application pool or can create one. for this article, i have entered the details shown below.

https

also, select defaultpool as the application pool for the newly created website.once done with configuring, click create.

now, let’s open our inet manager in azure virtual machine to check our newly created website. as seen, it’s created, but not yet started.

https

coming back to manage the application, the newly created website is now listed. notice that the status here is stopped, as seen in inet manager window. click the highlighted icon for the website, as shown in the image, shown below to start the website.

https

again, verify it in the azure virtual machine inet manager window.

cool! the website now starts.

https

similarly, you can experience all iis features like:

  • changing and creating applications pool
  • authentication
  • authorization
  • default document
  • directory browsing options
  • response header
  • ip restriction, if any
  • logging configuration

you can manage the application through the microsoft iis administration api.

https

the microsoft iis administration api also provides an built-in api explorer, which allows the developers to utilize the deep-in features exposed by administration api.

at the top right, you will find the link to browse api explorer. it will redirect you to connect to the window, shown below, where it requires the same token, which you generated.

alternatively, you can create a new token. enter token , check the box for keeping you connected, and click c onnect .

https

you will be navigated to the window shown below, where you can deep dive with all the methods and results exposed by administration api. we will learn more about this in later articles.

https

conclusion

we saw how microsoft iis administration api made life easy by allowing us to manage our azure virtual iis machine on hand-go reach.

this api is useful in scenarios where you have a hybrid deployment model with different nano servers, windows servers, etc. to manage and deploy from one single ui.

also, this super cool api plays a very useful role for continuous integration and continuos development models.

the official documentation is not yet released. i hope you found this article useful and productive.

happy azure coding!

azure mobile app API Machine Virtual Machine Web Service .NET ASP.NET Core Download Find the Link Web Protocols

Opinions expressed by DZone contributors are their own.

Related

  • 6 of the Best API Testing Tools in the Market
  • How to Select an API Management Platform for Your Business
  • Alexa Skill With .NET Core
  • Angular Tutorial: Angular 7 and the RESTEasy Framework

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: