Is web.config mandatory?

The web.config file was introduced starting from version 2022 R2. Its main purpose is to simplify IIS configuration and ensure successful deployment of PowerServer Web APIs. However, the web.config file is not mandatory, you can choose to not use it as in previous versions.

Here are a few scenarios where the web.config file is not required:

  1. If you have successfully published PowerServer Web APIs on IIS using version 2021 or 2022 (which do not generate web.config), and have no plan to change the current environment or folder structure, then you can continue without the web.config file, and only upgrade the Web APIs application files.

    For example, if you have manually converted the directory where the PowerServer Web API is located to the IIS sub-app, then you can launch the Web APIs without the web.config file.

  2. If you have created your own web.config, for example, you have used web.config to add Handler Mappings for the current site or exclude the impact of higher-level configurations in IIS on your application, then you should not have web.config automatically generated and deployed by PowerServer project; otherwise, the auto generated web.config file will overwrite your web.config file during deployment.

In summary, the web.config file is not mandatory if you have deployed successfully before without it, or if you need to use your own web.config file, or if you have manually converted Web API to an IIS sub-app. In these cases, you can choose to not use the auto generated web.config file.

To NOT generate the web.config file with the PowerServer project deployment, you can uncheck the web.config option in the Deploy page > Advanced tab (This option is selected by default when you choose to deploy to IIS or create a package).