I have a web part for Project Server 2013 that was developed by a colleague that's no longer in the company, and I need to support it. When I try to add the web part to a page I get the following error:

error from SharePoint

Deploying it from Visual Studio is successful because I can see the web part added using Get-SPSolution in the Powershell, but no errors show in the VS output window, and there was nothing in the Event Viewer.

I searched the entire code for the string "fileOrServerOrConnection", but I found nothing.

I have to admit I'm completely at a loss here because I have no idea how to investigate this problem.

Any suggestions at all? I don't expect a full answer to the problem, but at least some help on how to proceed the investigation would be very much appreciatted.


1 Answer 1


Ok, so the problem was coming from ConfigurationManager. Apparently, ConfigurationManager, scans the SharePoint's web.config file, to get a connection string, and then pass it onto DataContext. But because this key with the connection string didn't exist, the value being passed to DataContext was null.

Hope this helps someone out there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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