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 struggling to figure out a way to handle exceptions in my application.

My application is Hybrid and mainly a .Net application that uses SharePoint 2010 for document management only.

I want to delegate error handling completely to SharePoint. Not looking for a Response.Redirect("...sp-site-url/_layouts/Error.aspx") kind of a solution. I know that SharePoint offers exception handling and custom pages for Access Denied, Error, Confirmation, etc.

Is there a way by modifying web.config or by making some other configurations that can automatically identify the type of error and make SharePoint handle it? Or just by throwing an SPException it can be handled?

share|improve this question
Is your application also a web application ? Do you send users to SharePoint for the document management part, or do you completely hide SharePoint and do it for them ? – Cameron Verhelst Aug 5 '14 at 12:05
Yes, my application is a web application and we hide SharePoint for the user. For document management we have referenced SharePoint dlls in our .net solution. – Shashank Srivastava Aug 6 '14 at 8:59

Your Answer


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

Browse other questions tagged or ask your own question.