How to: Troubleshoot “Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.”
Working with DataSets, you might face this error message that will keep you from using code that you knew was working just fine. There may be many reasons for this error message to pop up on your screen, and most of them have been talked about extensively in other blog posts. A search online will [...]
Read MoreHow to: Troubleshoot “Server Error in ‘/’ Application.” error after SP2010 SP1 update
In case you just installed SharePoint 2010 Service Pack 1, or one of the new August/September 2011 updates is giving you a hard time, if you’re facing the following error: “Server Error in ‘/’ Application. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of [...]
Read MoreHow to: Debug SharePoint applications (attach to process).
First of all, you will need to turn off the custom errors. If you haven’t already done so, click here to find out how to turn off SharePoint Custom Errors After you’ve done that, you will be able to get more information about your application errors straight from the error page that will be served [...]
Read MoreHow to: Troubleshoot SharePoint error message “Trying to use an SPWeb object that has been closed or disposed and is no longer valid”
This error definitely comes from not following Microsoft’s best practices. There’s a great article on MSDN about best practices that everyone should have a read through. Click to read now Best Practices: Using Disposable Windows SharePoint Services Objects. Your code will most probably look a bit like this: using (SPSite scName = SPContext.Current.Site) { using [...]
Read MoreHow to: Troubleshoot “Web Application not found” errors in SharePoint 2010 development
When developing against SharePoint 2010, you might come across the following error: “The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.” What this [...]
Read MoreHow to: Troubleshoot error message “This control does not allow connection strings with the following keywords: ‘Integrated Security’, ‘Trusted_Connection’.”
One of the things that you will be tempted to attempt quite early in your SharePoint 2010 journey, is to create a control that pulls data off of a database. In fact, SharePoint Designer does a great job in offering you this ability in just a few clicks. However, you will find that deploying to [...]
Read MoreHow to: SharePoint Debug
F5: Possibly the most important key for the Visual Studio developer, the F5 is the shortcut to debug the current project. Visual Studio 2010 supports SharePoint debugging but in order to achieve maximum functionality, the developer will have to complete a few steps. 1. The first time the F5 key is pressed to debug a [...]
Read MoreHow to: Debugging SharePoint 2010 SandBoxed applications created in VS2010
Microsoft Visual Studio 2010 offers a very handy way to develop code (eg. a web part) for SharePoint 2010 in two flavours. You can either develop an application that will have full access to SharePoint features and resources (and which will require a SharePoint Administrator to install) or you can develop a SandBoxed solution that [...]
Read More