In this post, we will explain how to enable debugging in SharePoint Web.Config file as well as we will list all SharePoint Web config files Physical Paths.
To enable debugging in SharePoint Web.Config, you should first do the following:
- Set the compilation “debug” property to “TRUE“.
- Set the “CallStack” property to “TRUE“.
- Set the “Custmerrors” property to “Off“.
Steps
- Locate your SharePoint web application config files in all WFE servers cross the farm that usually located at
"C:\Inetpub\wwwroot\wss\VirtualDirectories\PortNum"
- You can also locate the directory of SharePoint Web Application using IIS as shown below.
- Don’t forget to take a backup from the web.config before modifying it.
- Run notepad or notepad ++ or any other editor as Administrator.
- From the notepad, open the web.config file.
- Search for the below entry.
<compilation debug="false">
- Set the debug value to “True“.
<compilation debug="true">
- Again, search for “CallStack“
<SafeMode CallStack="false">
- Set the CallStack=”TRUE“.
<SafeMode CallStack="true">
- In the end, search for “customErrors”
<customErrors mode="On" />
- Set the mode to “Off“.
<customErrors mode="Off" />
- Save the file.
Don’t forget to apply the same steps on other WFE servers within the farm.
In some cases, you may get a server error when opening the SharePoint Central Administration. In this case, you will need also to show the detail error message to can trace your issue.
For Central Administration, there are three different locations for web.config files that should be modified to be able to enable debugging in SharePoint Central Administration and shows the detail error messages:
- Central Administration Web Application folder.
- Layouts folder.
- Admin folder.
Please, don’t forget to take a backup from the web.config before modifying it.
Locate Central Administration Web Application folder
- Open IIS > Right Click on your Central Administration Site > Select “Explore”.
- Run notepad or notepad ++ as Administrator.
- From the notepad, open the Central Administration web.config file.
- Search for “CallStack”
<SafeMode CallStack="false">
- Set the CallStack=”True“.
<SafeMode CallStack="true">
- Again, search for “customErrors”
<customErrors mode="On" />
- Set the mode to “Off“.
<customErrors mode="On" />
- Save the file.
- Run notepad or notepad ++ as Administrator.
- From the notepad, open the web.config file that located at
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Layouts
- Search for “customErrors”
<customErrors mode="On" />
- Set the mode to “Off”.
<customErrors mode="On" />
- Save the file.
- Run notepad or notepad ++ as Administrator.
- From the notepad, open the web.config file that located at
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\ADMIN
- Search for “customErrors”
<customErrors mode="On" />
- Set the mode to “Off”.
<customErrors mode="On" />
- Save the file.
You should apply the above changes to all Application SharePoint servers that host Central Administration within your farm.
The web.config file that defines configuration settings for a SharePoint content Web application.
\\Inetpub\wwwroot\wss\VirtualDirectories\Port_Number
The web.config file that defines configuration settings for the SharePoint Central Administration application
\\Inetpub\wwwroot\wss\VirtualDirectories\ Port_Number_of_Central_Administration
The web.config file that defines configuration settings for pages used in SharePoint Central Administration.
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\ADMIN
Extending other Web Applications Web.Config
The web.config file and other .config files that together define configuration settings for extending other Web applications
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\CONFIG
/_vti_bin virtual directory Web.Config
The web.config file that defines configuration settings for the /_vti_bin virtual directory.
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\ISAPI
/_layouts virtual directory Web.Config
The web.config file that defines configuration settings for the /_layouts virtual directory.
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\LAYOUTS
Please, note that the 14 hive for SharePoint 2010 and 15hive for SharePoint 2013 and SharePoint 2016.
Conclusion
In conclusion, we have explained how to enable debugging in SharePoint Web Application and Central Administration as well as we have explored the locations list for all configuration files inside the SharePoint.
Applies To
- SharePoint 2016.
- SharePoint 2013.
- SharePoint 2010.
You might also like to read
- Install SharePoint 2016 step by step.
- Security Token Service cannot be activated due to This collection already contains an address with scheme HTTP.
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
Lots of helpful info here, thanks!