SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to SharePoint. I am developing a web part. I that I have created the .aspx page. When I am going to access that page by the URL it throws an error like.

 Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".

<!-- Web.Config Configuration File -->

        <customErrors mode="RemoteOnly"/>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

        <customErrors mode="On" defaultRedirect="mycustompage.htm"/>

I have tried every solution which I found by searching on Google.

I have tried bye giving

<customErrors mode="Off"/>  

I have also tried by converting my application folder to Web Application in IIS.
In short tried mostly all the solutions which I found on Google.
But still it is not working.

So can anybody help me with this problem.?
Thank you in advance...!!

share|improve this question
up vote 11 down vote accepted

In short, there's another web.config file in the LAYOUTS folder in the 14 hive that you need to change, it's set out fairly well here:

share|improve this answer
This helped me out. Thank you. I was making changes in web.config file inside inetpub folder but i don't have checked it in Layouts folder. I make changes in that and that worked properly. – Rahul Gokani Mar 26 '13 at 9:44
The link is broken – David May 23 '14 at 9:53
The post is still available using waybackmachine:… – ecm_dev Dec 27 '14 at 22:49

You need to debug properly without changing the settings!

firstly, what web.config are you modifying? where is it located and what version of sharepoint are you using?

if its a webpart that your using than the web.config you need to edit will be the web applications web.config.

goto IIS manager, web sites -> select the website in question -> right click and select open.

if its not a webpart but an actual application (mapped application in iis), it would have its own web.config:

goto IIS manager, web sites -> select the website in question -> click the plus sign next to it(expand) you should see some files and folders.... what your looking for is web applications, find the one your using -> right click it and select open.... you should see .cs and aspx files and folders... you should also have a web.config there. If not put one in.

if its a stand alone aspx (on its own within 12/14/15 hive) than it will be most likely under layouts folder, that will use the first one i stated above.

you need to put in the web.config:

        <customErrors mode="Off"/>

(which you have done)

if its an application, have you debugged the code? by attaching to process and putting a break point within the code you can see where abouts its breaking!

have you looked at event viewer on the server to see the errors that are being procduced? uls viwer?

if it is an application make sure that the project within iis manager is set as an application with the appropriate app pool

share|improve this answer
Thank you sir for your answer. I got the answer. It was in web.config file which was inside the Layouts folder. I changed its <customeError mode="off"/> and it worked. – Rahul Gokani Mar 26 '13 at 9:47
glad to see that i helped :) – ali Sharepoint Jun 21 '13 at 14:48

To solve this error you have to change settings in both the web.config file that one is in the IIS folder and the other web.config file which is in the LAYOUTS folder 15 hive.

Simply Change:

<customErrors mode="Off"/>
share|improve this answer

Simply check Web management service & windows process activation services in IIS, start both if they are set manual,& try then.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.