views:

215

answers:

2

Hi,

I have a page layout that I use in my SharePoint solution when I programmatically create a new publishing page. There is an error with one of the web parts that is included in the layout, so that when I am try and create the page, the operation fails. Can anyone suggest a way of debugging the error with the web part?

Thanks, MagicAndi.

+3  A: 

You could attach VS to the process running SharePoint.

Here's some pointers

confusedGeek
confusedGeek, accepted as answer. However, this doesn't help for the case where the web part is failing on a production server and Visual Studio is not installed!
MagicAndi
@MagicAndi, thanks sorry I don't really have a better suggestion for you. The only other thought would be to stick a mess load of logging statements in the offending web part, this would let you narrow it down on production. It's a crappy way to do it, but sometimes that's all you've got.
confusedGeek
+1  A: 

I've had quite a few issues with that too. In my case, SharePoint Designer kept removing the leading / on the XSL file reference property of a Data View web part causing it to fail. Clearly a bug but very annoying.

What type of web part is causing the error? Can you create a page based on you page layout manually?

ArjanP