Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly"/>
    </system.web>
</configuration>


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 -->

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

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
add comment

3 Answers

up vote 5 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: http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.