none
Server Error in '/' Application

    Question

  • Hi everyone,

                  i am create custom field type ( upload document ) in custom list column. when upload a file                  give run time error  like as 

    Server Error in '/' Application.

    Please resolve this error.

    Thanks

    Brajesh

    Friday, December 28, 2012 10:23 AM

Answers

  • Hi Manish

    There is only one web.config that you should have to change, and I would not recommend using this approach of navigating down into the folders directly, because you might hit the wrong file that may belong to a service or similar.  To avoid confusion it's better to open and edit web .config from  the IIS Manager , because then you are posititively sure that you are in the correct web.config + you also have quick access to resetting the web server,  something that you have to do in most cases for IIS to consume changes in web.config.


    Kind Regards

    Bjoern
    http://spviking.com
    Twitter: Follow @bjoern_rapp



    Friday, December 28, 2012 1:21 PM
    Moderator

All replies

  • Hi,

    Go to C:\inetpub\wwwroot\wss\VirtualDirectories\your web app port \ open web.config file.

    Now make below changes:

    set CallStack="true"
    and 
    <customErrors mode="Off" />
    Please take backup of config file before make any changes. Now you will see more relevant error message.


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Friday, December 28, 2012 10:32 AM
    Moderator
  • Hi Hemendra,

                 we already set call stack ="true" and Custom Errors mode="off".Error not resolve.

    Thanks

    Brajesh

    Friday, December 28, 2012 10:41 AM
  • Hi,

    you are not the only one, who experience the Server Error (according to discussion under: http://bernado-nguyen-hoan.com/2011/11/07/walkthrough-custom-field-type-for-uploading-and-displaying-images-in-sharepoint-2010-lists/). I suppose you followed that walkthrough.

    The advice from author is get the real error: http://bernado-nguyen-hoan.com/2011/04/23/cant-disable-customerrors-in-sharepoint/. You can also try to find related errors within SharePoint log files, IIS log files or sometimes also in Event Viewer.

    You can also contact Bernardo in discussion on his blog.

    Cheers, Rado


    Please let me know if my post was helpful.


    Friday, December 28, 2012 11:43 AM
  • You also have to set the compilation debug within <system.web> to true ,  in order for the ASP .NET runtime to compile pages with debug information.

    <compilation debug="true" />

    And to be precise: these changes don't fix your error, but it should give you some more detailed debug information on the origins of it.


    Kind Regards

    Bjoern
    http://spviking.com
    Twitter: Follow @bjoern_rapp






    Friday, December 28, 2012 11:51 AM
    Moderator
  • hello Brajesh

    as hemedra has suggested i hope you have done changes to web.config

    the page it is trying to open is upload.aspx which is in layouts folder which is located in 14 hive.

    if you open layouts folder you will see another web.config,

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

    you need to add below tags in <system.web> section.

      <customErrors mode="Off" />
      <compilation debug="true" />

    Then you will start getting actual error along with stack trace

    let me know the error.I hope we will be able to help you to solve your problem

    regards

    manish

    Friday, December 28, 2012 12:47 PM
  • Hi Manish

    There is only one web.config that you should have to change, and I would not recommend using this approach of navigating down into the folders directly, because you might hit the wrong file that may belong to a service or similar.  To avoid confusion it's better to open and edit web .config from  the IIS Manager , because then you are posititively sure that you are in the correct web.config + you also have quick access to resetting the web server,  something that you have to do in most cases for IIS to consume changes in web.config.


    Kind Regards

    Bjoern
    http://spviking.com
    Twitter: Follow @bjoern_rapp



    Friday, December 28, 2012 1:21 PM
    Moderator
  • Hi Bjoer

    as you must be aware . a web application can have mutiple web.configs

    every folder in web application can refer to its own different web.config 

    similarly layouts folder has its own web.config and its taking some of the configuration from there.

    that's the reason why even if we change web.config present at  (“C:\inetpub\wwwroot\wss\VirtualDirectories\<port>” the page is not showing call stack or exact error message as the page belongs to layouts folder.

    as its safe too.

    please refer to below thread which support my findings.

    http://stackoverflow.com/questions/3616652/how-can-i-see-the-exception-call-stack-in-sharepoint-2010

    http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12

    also please let me know if there is any other way to see the exact error in this case.

    regards

    manish


    Friday, December 28, 2012 2:16 PM
  • I agree there are several web.config's , but I have never experienced a case where you had to edit eny other web.config file than the one in the root folder in order to display full human-readable error messages. And I  would expect an administrative nightmare if you started going down the track of editing all the available web.config files this way.

    Kind Regards

    Bjoern
    http://spviking.com
    Twitter: Follow @bjoern_rapp

    Friday, December 28, 2012 5:21 PM
    Moderator
  • HI Bjoren

    This is the case where you need to change the web.config in layouts folder.

    and its a common practise to trouble shoot the error.

    i,m really keen to know if there is any other way than this.

    let me know

    regards

    manish


    • Edited by manish parab Saturday, December 29, 2012 3:26 AM
    Saturday, December 29, 2012 3:25 AM