<?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>Fredrik Haglund's blog &#187; Web Parts</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/tag/web-parts/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fredrikhaglund.se</link>
	<description>Chatter about EPiServer, ASP.NET, CSS and Web Development.</description>
	<lastBuildDate>Tue, 28 Jun 2011 13:37:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>EPiServer: &#8216;The virtual path could not be loaded&#8217; error when registering Web Parts in admin mode</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/07/09/episerver-the-virtual-path-could-not-be-loaded-error-when-registering-web-parts-in-admin-mode/</link>
		<comments>http://blog.fredrikhaglund.se/blog/2008/07/09/episerver-the-virtual-path-could-not-be-loaded-error-when-registering-web-parts-in-admin-mode/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 14:29:14 +0000</pubDate>
		<dc:creator>Fredrik Haglund</dc:creator>
				<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[EPiServer 5]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[Web Parts]]></category>
		<category><![CDATA[web.config]]></category>

		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/07/09/episerver-the-virtual-path-could-not-be-loaded-error-when-registering-web-parts-in-admin-mode/</guid>
		<description><![CDATA[So you have created some web parts and they work fine on your test machine but when you want to register them on a test or production machine you only get a uninformative &#8216;The virtual path could not be loaded&#8217;. I guess you have already checked that the path is correct several times and that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.fredrikhaglund.se/wp-content/uploads/2008/07/image.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 5px 10px; border-left: 0px; border-bottom: 0px" src="http://blog.fredrikhaglund.se/wp-content/uploads/2008/07/image-thumb.png" border="0" alt="image" width="240" height="130" align="right" /></a>So you have created some web parts and they work fine on your test machine but when you want to register them on a test or production machine you only get a uninformative &#8216;The virtual path could not be loaded&#8217;.</p>
<p>I guess you have already checked that the path is correct several times and that you have deployed all DLL&#8217;s and ASP.NET files. What is wrong?</p>
<h3>LoadControl() parses and compiles your markup</h3>
<p>A quick look with reflection reveals the LoadControl() is called to verify that the web part really exists. When you ask ASP.NET for a user control it will parse the ASCX-file, generate code and then compile it.</p>
<p>So there is a lot that can go wrong and all exceptions from this process is swallowed by the user interface and replaced with virtual path could not be loaded.</p>
<p>A good way to actually see the exception is to create a dummy aspx file and register all user controls and reference them from markup. When you try to view the aspx file any compilation error from the user controls will surface.</p>
<h3>Examine compile and pages tag in your web.config</h3>
<p>The most common reason markup works fine on one machine but not another is differences in web.config. Check the compilation and pages tag and compare them for differences between the machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fredrikhaglund.se/blog/2008/07/09/episerver-the-virtual-path-could-not-be-loaded-error-when-registering-web-parts-in-admin-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

