<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Configuration and Deployment</title><link>http://forums.asp.net/26.aspx</link><description>Configuring and deploying ASP.NET applications - web.config, \bin, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/3088241.aspx</link><pubDate>Tue, 14 Apr 2009 16:59:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3088241</guid><dc:creator>dunxz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3088241.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=3088241</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m also getting this error and hunting for a solution. &lt;/p&gt;
&lt;p&gt;the&amp;nbsp;following post:&lt;/p&gt;
&lt;p&gt;&lt;span class="734315020-14042009"&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;&lt;a href="http://blogs.msdn.com/vijaysk/archive/2008/09/02/using-themes-in-asp-net-loads-system-drawing-namespace.aspx?CommentPosted=true#commentmessage"&gt;http://blogs.msdn.com/vijaysk/archive/2008/09/02/using-themes-in-asp-net-loads-system-drawing-namespace.aspx?CommentPosted=true#commentmessage&lt;/font&gt;&lt;/span&gt;&lt;span class="734315020-14042009"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="734315020-14042009"&gt;&lt;font color="#0000ff"&gt;refers to a hot fix: &lt;span class="734315020-14042009"&gt;&lt;font face="Arial" color="#800080" size="2"&gt;&lt;a href="http://support.microsoft.com/kb/954316"&gt;http://support.microsoft.com/kb/954316&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m&amp;nbsp;unclear about version nos.&amp;nbsp;Is this fix included in 3.5SP1? The version no. is lower but datetime stamp is higher. Does anyone have any more info?&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/2772980.aspx</link><pubDate>Fri, 28 Nov 2008 10:21:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2772980</guid><dc:creator>zarzar</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2772980.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2772980</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;Today I get this #6`[|{ &lt;img src="http://forums.asp.net/emoticons/emotion-12.gif" alt="Angry" /&gt; exception for the first time on a test server...&lt;/p&gt;
&lt;p&gt;Few minutes later.. gone ! very very strange &lt;img src="http://forums.asp.net/emoticons/emotion-42.gif" alt="Confused" /&gt;&lt;/p&gt;
&lt;p&gt;Read this &amp;gt; &lt;a href="http://blogs.msdn.com/vijaysk/archive/2008/09/02/using-themes-in-asp-net-loads-system-drawing-namespace.aspx?CommentPosted=true#commentmessage"&gt;http://blogs.msdn.com/vijaysk/archive/2008/09/02/using-themes-in-asp-net-loads-system-drawing-namespace.aspx?CommentPosted=true#commentmessage&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/2097998.aspx</link><pubDate>Wed, 09 Jan 2008 01:10:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2097998</guid><dc:creator>acl123</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2097998.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2097998</wfw:commentRss><description>&lt;p&gt;Given the numer of people complaining about this error, the seriousness of the problem (as it tends to totally destroy your application), and the fact that the error doesn&amp;#39;t look like it&amp;#39;s been fixed in 3.5, maybe we should look into contacting Microsoft about it. Now, how do I go about that...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/2091764.aspx</link><pubDate>Sat, 05 Jan 2008 07:38:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2091764</guid><dc:creator>TravisWhidden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2091764.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2091764</wfw:commentRss><description>&lt;p&gt;Sorry to bring this back up.&lt;/p&gt;
&lt;p&gt;I dont know if its related, but I never had this problem for years. It&amp;nbsp; just showed up.&amp;nbsp; I recently installed .net 3.5 and of course all the service packs for .net in one day (yesterday).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I wonder if its related to the .net framework service pack.&amp;nbsp; I will have to find a resolution in the code.&lt;/p&gt;
&lt;p&gt;Travis&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1993368.aspx</link><pubDate>Tue, 06 Nov 2007 23:40:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1993368</guid><dc:creator>codertown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1993368.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1993368</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;acl123:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;Good luck. Let us know if you find a solution.&lt;/p&gt;&lt;p&gt;By the way, when we were setting up our VPS we were quite aggressive with security and removed or turned off quite a few Windows components that we didn&amp;#39;t think were necessary. I have a suspicion this was the cause of the problem. Are you on shared hosting, or do you have access to your server?&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; we are on shared hosting, no control over it; we have no time to wait till godaddy or microsoft will come up with a solution so we move to another hosting :) Hopefully it will be better (but not cheaper though).&lt;br /&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1993352.aspx</link><pubDate>Tue, 06 Nov 2007 23:16:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1993352</guid><dc:creator>acl123</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1993352.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1993352</wfw:commentRss><description>&lt;p&gt;Good luck. Let us know if you find a solution.&lt;/p&gt;&lt;p&gt;By the way, when we were setting up our VPS we were quite aggressive with security and removed or turned off quite a few Windows components that we didn&amp;#39;t think were necessary. I have a suspicion this was the cause of the problem. Are you on shared hosting, or do you have access to your server?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1992495.aspx</link><pubDate>Tue, 06 Nov 2007 15:59:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1992495</guid><dc:creator>codertown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1992495.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1992495</wfw:commentRss><description>follow-up:


We removed all references to AJAX whatsoever and tried to use free date picker control (BasicDatePicker) - and we&amp;#39;ve got the same error when accessing the page with that control on it.

Something must be wrong with the server setup...</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1991347.aspx</link><pubDate>Tue, 06 Nov 2007 03:38:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1991347</guid><dc:creator>codertown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1991347.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1991347</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;acl123:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We ended up starting again on a completely fresh install of the VPS on a different machine. Not fun at all.&lt;/p&gt;
&lt;p&gt;The problem hasn&amp;#39;t come back for a few months since then, so obviously this is not a code or site configuration issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Still, everyday I worry about it returning... it&amp;#39;s like a ticking time bomb.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; Thanks for the update even though it&amp;#39;s bad news. :( In our case we just cannot reinstall anything on shared web hosting. Looks like we have bad luck with our server there and that issue happens for us. Some of their users have AJAX Toolkit working fine though.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1991131.aspx</link><pubDate>Tue, 06 Nov 2007 00:09:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1991131</guid><dc:creator>acl123</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1991131.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1991131</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;We ended up starting again on a completely fresh install of the VPS on a different machine. Not fun at all.&lt;/p&gt;&lt;p&gt;The problem hasn&amp;#39;t come back for a few months since then, so obviously this is not a code or site configuration issue.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Still, everyday I worry about it returning... it&amp;#39;s like a ticking time bomb.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1990637.aspx</link><pubDate>Mon, 05 Nov 2007 18:22:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1990637</guid><dc:creator>codertown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1990637.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1990637</wfw:commentRss><description>&lt;p&gt;Guys, any update on the problem? We have the same exception with godaddy web hosting. Locally works just fine. We put&amp;nbsp; AJAX Toolkit dll in Bin folder, we do not put Extensions dll there (as it&amp;#39;s installed already on the server and as godaddy recommends). &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cannot find other solutions rather than change the web hosting, but no guarantee if another one won&amp;#39;t have the same issue... :(&lt;/p&gt;&lt;p&gt;The sad part is, looks like some ppl have AJAX working fine including AJAX Toolkit as well on godaddy windows hosting. How come?! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.west-wind.com/WebLog/ShowPost.aspx?id=3381" title="http://www.west-wind.com/WebLog/ShowPost.aspx?id=3381" target="_blank"&gt;http://www.west-wind.com/WebLog/ShowPost.aspx?id=3381&amp;nbsp; &lt;/a&gt;- no solution :( &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1867899.aspx</link><pubDate>Tue, 21 Aug 2007 00:19:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1867899</guid><dc:creator>acl123</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1867899.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1867899</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Yep, tried an IIS reset and it didn&amp;#39;t work.&lt;/p&gt;&lt;p&gt;We had no solution but to move to a new host which solved the problem.&lt;/p&gt;&lt;p&gt;This error is nasty. Beware all .Net users!&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1866285.aspx</link><pubDate>Mon, 20 Aug 2007 08:40:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1866285</guid><dc:creator>CYCLIST</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1866285.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1866285</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m getting the same error, &amp;quot;The type initializer for &amp;#39;System.Drawing.ToolboxBitmapAttribute&amp;#39; threw an exception&amp;quot;&amp;nbsp;on a previously working website hosted at GoDaddy.com.&amp;nbsp;&amp;nbsp;The error does not occur for the same page on my development machine.&amp;nbsp; The error started occurring within the last few weeks (it is now August 19th).&amp;nbsp; I&amp;#39;m not using any third party products in the website, but I am using a UserControl&amp;nbsp;in the page header.&amp;nbsp;&amp;nbsp; I researched the problem on Google, and one person wrote that the IIS service needs to be restarted.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception</title><link>http://forums.asp.net/thread/1856102.aspx</link><pubDate>Tue, 14 Aug 2007 00:54:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1856102</guid><dc:creator>acl123</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1856102.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=1856102</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;All of a sudden I started getting this nasty exception all over the place:&lt;/p&gt;&lt;p&gt;&lt;i&gt;The type initializer for &amp;#39;System.Drawing.&lt;/i&gt;&lt;i&gt;ToolboxBitmapAtt&lt;/i&gt;&lt;i&gt;ribute&amp;#39; 
threw an exception.&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Some relevant observations:&lt;br /&gt;* The error started occuring a few hours after 
the last deployment to the live server, not immediately after. So it 
basically started occuring of its own accord.&lt;br /&gt;&lt;br /&gt;* We have recently moved 
to a new host (a VPS). The error only occurs on that server, not our local 
server nor at the old host&amp;#39;s (which was a shared environment).&lt;br /&gt;&lt;br /&gt;* The problem is basically the same 
as this guys:&lt;br /&gt;&lt;a href="http://www.west-wind.com/WebLog/posts/3381.aspx"&gt;http://www.west-wind.com/WebLog/posts/3381.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;* 
I tried reinstalling Ajax extensions, then our website in IIS, then finally 
the .Net 2 framework. But the error still occurs after all this.&lt;/p&gt;&lt;p&gt;* The error occurs on line 1, which is just the page directive:&lt;br /&gt;&amp;lt;%@ Page 
Language=&amp;quot;C#&amp;quot; 
AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;WebForm1.aspx.cs&amp;quot; 
Inherits=&amp;quot;Test.WebForm1&amp;quot; %&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m finding it difficult to get a decent trace, but here is one that our CMS 
provided:&lt;br /&gt;&lt;br /&gt;The type initializer for 
&amp;#39;System.Drawing.ToolboxBitmapAttribute&amp;#39; threw an exception.&lt;br /&gt;at 
System.Web.UI.TemplateParser.ProcessException(Exception ex)&lt;br /&gt;at 
System.Web.UI.TemplateParser.ParseStringInternal(String 
text, Encoding fileEncoding)&lt;br /&gt;at 
System.Web.UI.TemplateParser.ParseString(String text, 
VirtualPath virtualPath, Encoding fileEncoding)&lt;br /&gt;at 
System.Web.UI.TemplateParser.ParseFile(String 
physicalPath, VirtualPath virtualPath)&lt;br /&gt;at 
System.Web.UI.TemplateParser.ParseInternal()&lt;br /&gt;at 
System.Web.UI.TemplateParser.Parse()&lt;br /&gt;at 
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()&lt;br /&gt;at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)&lt;br /&gt;at 
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()&lt;br /&gt;at 
System.Web.Compilation.BuildProvidersCompiler.PerformBuild()&lt;br /&gt;at 
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)&lt;br /&gt;at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, 
Boolean noBuild, Boolean allowCrossApp, 
Boolean allowBuildInPrecompile)&lt;br /&gt;at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, 
VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean 
allowBuildInPrecompile)&lt;br /&gt;at 
System.Web.UI.TemplateControl.LoadControl(VirtualPath 
virtualPath)&lt;br /&gt;at 
System.Web.UI.TemplateControl.LoadControl(String 
virtualPath)&lt;br /&gt;at umbraco.macro.loadUserControl(String fileName, 
Hashtable attributes, page umbPage)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My own code doesn&amp;#39;t use the ToolboxBitmapAttribute, but third party products like Peter Blum&amp;#39;s and Telerik&amp;#39;s do.&lt;/p&gt;&lt;p&gt;Peter Blum replied with some useful hints:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;* The &amp;quot;type initializer&amp;quot; concept probably needs some research, but I&amp;#39;m 
guessing that is an important clue. A quick web search of &amp;quot;type initializer&amp;quot; finds many situations it occurs for a variety of classes.&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;* The stack trace suggests that this is happening as ASP.NET is compiling your 
web form. The error is happening as the ASP.NET parser runs. Again this is 
external from my code (even creating or &amp;quot;type initializing&amp;quot; the attribute is 
not something my code does).&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;This problem seems to be a rare but devastating flaw which hopefully Microsoft can provide a fix for ASAP.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>