ASP.NET - Configuration Error Message - Asked By james on 02-Mar-10 10:34 PM

Server Error in '/mdm_ntier' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred loading a configuration file: Access to the path 'E:\Inetpub\wwwroot\mdm_ntier\web.config' is denied.

Source Error:

[No relevant source lines]
 

Source File: E:\Inetpub\wwwroot\mdm_ntier\web.config    Line: 0

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1873; ASP.NET Version:2.0.50727.1433

Event code: 3008
Event message: A configuration error has occurred.
Event time: 3/3/2026 1:53:11 PM
Event time (UTC): 3/3/2026 2:53:11 AM
Event ID: 24f54bccce34486ba6ae1d9582f18484
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/Root/mdm_ntier-6-129120583917718082
    Trust level: Full
    Application Virtual Path: /mdm_ntier
    Application Path: E:\Inetpub\wwwroot\mdm_ntier\
    Machine name: AUAEUAP451WBC32
 
Process information:
    Process ID: 3696
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: An error occurred loading a configuration file: Access to the path 'E:\Inetpub\wwwroot\mdm_ntier\web.config' is denied. (E:\Inetpub\wwwroot\mdm_ntier\web.config)
 
Request information:
    Request URL: http://localhost/mdm_ntier/VersionMgr.asmx
    Request path: /mdm_ntier/VersionMgr.asmx
    User host address: 127.0.0.1
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)
 
 

Kirtan Patel replied to james on 02-Mar-10 11:12 PM
 add read, execute, and list access for the ASPNET account on the root Web site or on any virtual directory, follow these

 steps:
1. In Windows Explorer, browse to the folder that contains the root Web site (which is C:\Inetpub\Wwwroot by default) or the virtual directory.
2. Right-click the folder, and then click Properties.
3. On the Security tab, click Add.
4. Type ComputerName\ASPNET (for example, on a computer named Webdev, type Webdev\ASPNET), and then click OK.
5. Allow the following permissions for the ASPNET account:
• Read & Execute
• List Folder Contents
• Read
6. Click OK to close the Properties dialog box and to save the changes.
DL M replied to james on 02-Mar-10 11:14 PM
First Check carefully for any sort of syntax error in your web.config file, in the connection string or anything else you added or changed.  If you're getting the same error  got, it might be that the server fails to parse your file so tries to use a default one that it can't access.

also follow this step

  1. Right click on web.config and select Properties.  
  2. Go to the security tab.  
  3. Click Advanced
  4. Go to the Owner tab
  5. At this point I noticed that the “current owner of this item” was none.
  6. Change the owner to an account that you have access to. 
  7. Click OK to accept the ownership change.
  8. Click Cancel to get out of the security settings dialog.
Huggy Bear replied to james on 02-Mar-10 11:49 PM
In addition to providing access to ASPNET user, if your application is using impersonation then you should provide the access to the impersonating user credentials to that folder.