Share via

Sharepoint config error

SLRDC HAL 0 Reputation points
2026-06-23T04:07:04.4533333+00:00

failed to provision exception of type systemiofile not fount web config file not found please help

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments

2 answers

Sort by: Most helpful
  1. Teddie-D 18,215 Reputation points Microsoft External Staff Moderator
    2026-06-23T05:31:50.83+00:00

    Hi @SLRDC HAL

    Please note that we're not Microsoft Support; this is a user-to-user community forum. Moderators here don't have access to your environment or Microsoft's backend systems, so we can only provide guidance based on public documentation and community experience.

    The issue: “failed to provision… System.IO.FileNotFoundException: web.config file not found” is typically encountered in SharePoint Server environments during web application creation, PSConfig execution, or provisioning operations, and it indicates that SharePoint is unable to locate or complete the creation of the expected IIS configuration files during provisioning.

    In most cases, this issue occurs because SharePoint fails to fully provision the IIS virtual directory under: C:\inetpub\wwwroot\wss\VirtualDirectories\<port>\

    As a result:

    • The web.config file is not created, or
    • The file exists but is not accessible due to incomplete provisioning, or
    • The IIS site was created but SharePoint configuration did not complete successfully

    This leads to the exception: System.IO.FileNotFoundException: web.config file not found

    Although the error appears to indicate a missing file, the real issue is usually a failed or partial SharePoint provisioning step, such as:

    • Interrupted or failed PSConfig / Product Configuration Wizard
    • Incomplete web application creation in Central Administration
    • IIS virtual directory created but not properly extended by SharePoint
    • Timer service or provisioning process failing mid-deployment

    You may check:

    1.IIS virtual directory exists

    C:\inetpub\wwwroot\wss\VirtualDirectories\

    Ensure the correct port folder exists.

    2.Check if web.config exists. If the file is missing, provisioning did not complete successfully.

    Here are some steps you may try:

    1.Restart SharePoint Timer Service

    Restart-Service SPTimerV4

    2.Re-run SharePoint configuration wizard

    psconfig.exe -cmd upgrade -inplace b2b -wait -force

    3.Verify permissions

    Ensure the SharePoint application pool account and related service groups (WSS_WPG / IIS_IUSRS) have appropriate access to: C:\inetpub\wwwroot\wss\

    4.Recreate the Web Application

    If the web application is partially created and cannot be repaired, consider removing and recreating it.

    I hope this helps.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    Was this answer helpful?


  2. AI answer

    2026-06-23T04:07:37.9433333+00:00

    The error indicates that SharePoint cannot find a required web.config file during provisioning. This typically happens when web.config files are missing, inconsistent, or inaccessible on one or more web front-end servers.

    Follow these steps on all SharePoint front-end servers:

    1. Confirm permissions to web.config
      Ensure the account being used is:
      • A member of the Farm Administrators group.
      • A local Administrators group member on the server.
        Only local admins, farm admins, or accounts managed by SharePoint can access web.config by default.
    2. Locate the web.config file for the affected web application
      On the failing server:
      • Browse to C:\inetpub\wwwroot\wss\VirtualDirectories\<Port_Number> (for example, C:\inetpub\wwwroot\wss\VirtualDirectories\80).
      • Verify that web.config exists in that folder.
      • If it does not exist, copy it from a healthy front-end server hosting the same web application.
    3. Ensure web.config files are identical across the farm
      If there are multiple front-end web servers:
      • On each server, go to the corresponding VirtualDirectories\<Port_Number> folder and note the modified date of web.config.
      • Compare the web.config files (for example, using a text comparison tool) and decide which one is correct.
      • On each failing server, delete the incorrect web.config and copy the correct one from a working server.
    4. Verify and edit via IIS if needed
      On each front-end server:
      • Open Server ManagerToolsInternet Information Services (IIS) Manager.
      • In Connections, expand the server → Sites → select the affected site.
      • In Features View, double-click Configuration Editor to inspect sections of web.config if needed.
    5. Back up before further changes
      Before stopping services or reprovisioning, back up C:\inetpub\wwwroot\wss\VirtualDirectories because stopping the SharePoint Foundation Web Application service can cause loss of web.config changes and other customizations.
    6. If provisioning is stuck due to file locks
      If the error appears while starting or provisioning the SharePoint Foundation Web Application service and ULS logs show file-in-use errors (for example, STSSOAP.DLL):
      • Exclude the SharePoint folders from antivirus scanning as per KB 952167.
      • Stop the SharePoint Foundation Web Application service using PowerShell:
             $service = Get-SPServiceInstance -Server $server | where-object {$_.TypeName -eq "Microsoft SharePoint Foundation Web Application"}
             Stop-SPServiceInstance $service
        
      • Remove any leftover sites in IIS Manager for that web application.
      • Clear the SharePoint configuration cache.
      • Reprovision the service:
             stsadm -o provisionservice -action start -servicetype spwebservice
        

    After these steps, rerun the provisioning/configuration operation that was failing.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.