views:

12

answers:

0

I'm running some code to get a publishing page at a certain url. In some cases the page will exist and in most it won't.

Sometimes when the page doesn't exist, the following line of code just sits there being executed:

PublishingPage pubPage = pubWeb.GetPublishingPage("http://some/long/url.aspx");

There is no exception being thrown and nothing out of the ordinary regarding the url. When I pause the debugging in visual studio 2010 it shows that external code is at the top of the stack so I can't really tell what's going on. In addition, sometimes when I press the continue button the process continues as normal like it should have! Is this some kind of bug with the visual studio debugging console? Maybe a bug in SharePoint? The CPU usage is at 100%. In reality this bug is very difficult for me to reproduce on a specific page but out of a 10,000 page run I can get it to error in such a way about 3 times.

Does anyone else get this or is there a way to debug sharepoint as it's doing this?

The development machine set up is VS 2010, SharePoint 2010, SQL Express.

Thanks,