<?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.config</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/tag/webconfig/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>
		<item>
		<title>Web.config, version control and nice formatting</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/01/12/webconfig-version-control-and-nice-formatting/</link>
		<comments>http://blog.fredrikhaglund.se/blog/2008/01/12/webconfig-version-control-and-nice-formatting/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 18:34:43 +0000</pubDate>
		<dc:creator>Fredrik Haglund</dc:creator>
				<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web.config]]></category>

		<guid isPermaLink="false">http://blog.fredrikhaglund.se/?p=59</guid>
		<description><![CDATA[EPiServer has a site tag with a lot of attributes. When you change the web.config from EPiServer Manager or by calling Save on the Configuration class yourself all attributes will be on one looong line (this is default behaivour by the dotnet framework so its not EPiServers fault). If you put web.config under version control [...]]]></description>
			<content:encoded><![CDATA[<p>EPiServer has a site tag with a lot of attributes. When you change the web.config from EPiServer Manager or by calling Save on the Configuration class yourself all attributes will be on one looong line (this is default behaivour by the dotnet framework so its not EPiServers fault).</p>
<p>If you put <em>web.config</em> under version control and would prefer if changes to singe attributes are easy to detect with a diff tool, this is not the optimal.</p>
<p>It is possible to change formatting in Visual Studio to get one attribute per line and that works much better for text diff tools. (This requires that you do your changes with Notepad or Visual Studio and not use EPiServer Manager or the Admin Mode to change the settings.)</p>
<p>Go to Tools -&gt; Options -&gt; Text Editor -&gt; XML -&gt; Formatting and select &#8220;Align attributes each on a separate line&#8221;</p>
<p>Click Edit -&gt; Advanced -&gt; Format Document (or Format Selection if you only want to adjust a part of the file) before you check in your <em>web.config</em> to reformat.</p>
<p>Voilà! Your <em>web.config</em> is readable!</p>
<p>(See also <a href="http://www.episerver.com/en/EPiServer_Knowledge_Center/Developer-Forum2/EPiServer-Developer-Forums-/EPiServer-CMS-version-5/14774/">discussion in EPiServer Developer Forum</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fredrikhaglund.se/blog/2008/01/12/webconfig-version-control-and-nice-formatting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

