7

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

11

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://web.archive.org/web/20130909002813/http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12

3

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"/>
2

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

  • 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 Jafer Jun 21 '13 at 14:48
1

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

0

In my situation, database lost like this, usually databases are not in same server, make sure it online and related database should online also, configuration wizard can find the database name

0

This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products Configuration Wizard, located on the Start menu in Microsoft SharePoint 2010 Products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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