<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dom Cosgrove Blog &#187; Debugging</title>
	<atom:link href="http://blog.domcosgrove.com/tag/debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.domcosgrove.com</link>
	<description>Dom&#039;s views on the SharePoint World</description>
	<lastBuildDate>Tue, 18 Oct 2011 12:59:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>File Not Found SharePoint Error</title>
		<link>http://blog.domcosgrove.com/file-not-found-sharepoint-error/</link>
		<comments>http://blog.domcosgrove.com/file-not-found-sharepoint-error/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 11:25:00 +0000</pubDate>
		<dc:creator>Dominick Cosgrove</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://blog.domcosgrove.com/file-not-found-sharepoint-error/</guid>
		<description><![CDATA[If in SharePoint 2007 (WSS or MOSS) you get a file not found error on a page, the chances are you are missing a custom or 3rd Party UserControl. A easy way to determine what control is missing is to: 1. Enable debugging – see my previous post (link); 2. View the source of the [...]]]></description>
			<content:encoded><![CDATA[<p>If in SharePoint 2007 (WSS or MOSS) you get a file not found error on a page, the chances are you are missing a custom or 3rd Party UserControl. </p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb4.png" width="278" height="116" /></a> </p>
<p>A easy way to determine what control is missing is to:</p>
<p>1. Enable debugging – see my previous post (<a href="http://blog.domcosgrove.com/debugging-sharepoint-errors/" target="_blank">link</a>);</p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb5.png" width="448" height="119" /></a> </p>
<p>2. View the source of the error page. In Internet Explorer, right click on the error page and select view source. In the source you will find the inner exception, which will give the path to the missing ascx UserControl file;</p>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><span style="color: #008000">&lt;!-- </span><span style="color: #008000">[FileNotFoundException]: The file <strong>/_controltemplates/Centrix/HRQuickFileSearch.ascx</strong> does not exist.</span><span style="color: #008000">   at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound)</span><span style="color: #008000">   at Microsoft.SharePoint.ApplicationRuntime.SPVirtualFile.CalculateFileDependencies(HttpContext context, SPRequestModuleData basicRequestData, ICollection&amp; directDependencies, ICollection&amp; childDependencies)</span><span style="color: #008000">   at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.EnsureDependencies(HttpContext context, SPRequestModuleData requestData)</span><span style="color: #008000">   at ….</span><span style="color: #008000">--&gt;</span></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.domcosgrove.com/file-not-found-sharepoint-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debugging SharePoint Errors</title>
		<link>http://blog.domcosgrove.com/debugging-sharepoint-errors/</link>
		<comments>http://blog.domcosgrove.com/debugging-sharepoint-errors/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 11:16:00 +0000</pubDate>
		<dc:creator>Dominick Cosgrove</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://blog.domcosgrove.com/debugging-sharepoint-errors/</guid>
		<description><![CDATA[The following is a must have when developing on SharePoint. Unfortunately the SharePoint Custom Error page does not provide a great deal of information as to the cause of the error. Typical SharePoint Errors area “File Not Found”, “An Error occurred please contact the system administrator”. Unfortunately for the system administrator / developer these messages [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a must have when developing on SharePoint. Unfortunately the SharePoint Custom Error page does not provide a great deal of information as to the cause of the error. Typical SharePoint Errors area<em> “File Not Found”, “An Error occurred please contact the system administrator”. </em>Unfortunately for the system administrator / developer these messages are not particular helpful. Fortunately it is easy enough to get a more descriptive error message, that should hopefully see you on your way to resolving the error.</p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb2.png" width="313" height="129" /></a> </p>
<p> 1. Open the Web.Config file for the web application that you want to debug. The default location for the Web.Config files is C:\Inetpub\wwwroot\wss\VirtualDirectories\[Web Application Name]</p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb3.png" width="453" height="256" /></a></p>
<p>2. Change <strong>CallStack</strong> from <em>false</em> to <em>true –</em> XPath = “Configuration\SharePoint\SafeMode”</p>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><span style="color: #0000ff">&lt;</span><span style="color: #800000">SafeMode</span> <span style="color: #ff0000">MaxControls</span><span style="color: #0000ff">=&quot;200&quot;</span> <span style="color: #ff0000">CallStack</span><span style="color: #0000ff">=&quot;false&quot;</span> <span style="color: #ff0000">DirectFileDependencies</span><span style="color: #0000ff">=&quot;10&quot;</span> <span style="color: #ff0000">TotalFileDependencies</span><span style="color: #0000ff">=&quot;50&quot;</span> <span style="color: #ff0000">AllowPageLevelTrace</span><span style="color: #0000ff">=&quot;false&quot;</span><span style="color: #0000ff">&gt;</span>    <span style="color: #0000ff">&lt;</span><span style="color: #800000">PageParserPaths</span><span style="color: #0000ff">&gt;</span>    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">PageParserPaths</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">SafeMode</span><span style="color: #0000ff">&gt;</span></pre>
<p></div>
<p>3. Change <strong>CustomErrors Mode</strong> from <em>On</em> to <em>Off</em> – XPath = “Configuration\System.Web”</p>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><span style="color: #0000ff">&lt;</span><span style="color: #800000">customErrors</span> <span style="color: #ff0000">mode</span><span style="color: #0000ff">=&quot;Off&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.domcosgrove.com/debugging-sharepoint-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Issues Debugging with STSDev</title>
		<link>http://blog.domcosgrove.com/issues-debugging-with-stsdev/</link>
		<comments>http://blog.domcosgrove.com/issues-debugging-with-stsdev/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 16:21:00 +0000</pubDate>
		<dc:creator>Dominick Cosgrove</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[STSDev]]></category>

		<guid isPermaLink="false">http://blog.domcosgrove.com/issues-debugging-with-stsdev/</guid>
		<description><![CDATA[STSDev is a useful utility for accelerating your SharePoint Application development. The tool creates your initial project structure for you, gives the assembly a strong name (for GAC deployment) and most importantly provides a number of custom build events that facilitate deploying your solution. A nice thing about STSDev is that it gives the developer [...]]]></description>
			<content:encoded><![CDATA[<p align="justify"><a href="http://stsdev2008.codeplex.com/" target="_blank">STSDev</a> is a useful utility for accelerating your SharePoint Application development. The tool creates your initial project structure for you, gives the assembly a strong name (for GAC deployment) and most importantly provides a number of custom build events that facilitate deploying your solution.</p>
<p align="justify">A nice thing about STSDev is that it gives the developer exposure to the build events that its counterparts do not (e.g. my other friend WSPBuilder). You can really see what is going on behind the scenes which really helps when you need to get down to the nitty gritty.</p>
<p align="justify">One issue that I come across regularly is that when I build and deploy my solution with STSDev then try to debug it, the break point is never hit. The reason for this is that the build configuration are not configured to output the debug info. The following shows you how to fix this in Visual Studio 2008:</p>
<p>1. Open your STSDev created project in Visual Studio 2008;</p>
<p>2. From the Toolbar select <strong>Project</strong> | <strong>[Project Name] Properties…;</strong></p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb6.png" width="207" height="244" /></a> </p>
<p>3. Select the build tab on the Project Property Page;</p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb7.png" width="350" height="165" /></a> </p>
<p>4. Scroll down to the bottom of the build page and select <strong>Advanced…;</strong></p>
<p>5. On the <strong>Advanced Build Settings</strong> dialog box set the <strong>Debug Info</strong> to <strong>Full;</strong></p>
<p><a href="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.domcosgrove.com/wp-content/uploads/2009/09/image_thumb8.png" width="244" height="176" /></a> </p>
<p>6. Click OK and rebuild and deploy your project, you should now be ready to debug your solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.domcosgrove.com/issues-debugging-with-stsdev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

