Could not load type '_Default'<p>I've looked at countless blogs and forums and have tried everything and I still get the error: <font face=Arial>Could not load type '_Default'.</font></p> <p>I created an ASP.NET web site, using C# and when I go to the Default.aspx page in the browser I get the error. So far I have removed my lib environment variables from Windows System panel, checked with the VS2005 Cmd Prompt to make sure it's set correctly there, I build the web site, I have my Web.config file telling it debug=true, and so on. No matter what I do, after it builds and I copy the files to the web server and navigate to the page, I get the Could not load type '_Default' error.</p> <p>The only way I've been able to get around this is to use Inline Coding and I desperately want to get away from that!!!</p> <p>Any help is greatly appreciated.</p> <p>- Chris</p>© 2009 Microsoft Corporation. All rights reserved.Tue, 15 Jul 2008 08:06:47 Z72eba30d-450f-4729-86be-f4e887ee7788http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#72eba30d-450f-4729-86be-f4e887ee7788http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#72eba30d-450f-4729-86be-f4e887ee7788Chris Viahttp://social.msdn.microsoft.com/Profile/en-US/?user=Chris%20ViaCould not load type '_Default'<p>I've looked at countless blogs and forums and have tried everything and I still get the error: <font face=Arial>Could not load type '_Default'.</font></p> <p>I created an ASP.NET web site, using C# and when I go to the Default.aspx page in the browser I get the error. So far I have removed my lib environment variables from Windows System panel, checked with the VS2005 Cmd Prompt to make sure it's set correctly there, I build the web site, I have my Web.config file telling it debug=true, and so on. No matter what I do, after it builds and I copy the files to the web server and navigate to the page, I get the Could not load type '_Default' error.</p> <p>The only way I've been able to get around this is to use Inline Coding and I desperately want to get away from that!!!</p> <p>Any help is greatly appreciated.</p> <p>- Chris</p>Wed, 17 Jan 2007 14:28:16 Z2007-01-17T14:28:16Zhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#8b6e51e4-f888-41b5-aa9c-17002719234dhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#8b6e51e4-f888-41b5-aa9c-17002719234dTaylorMichaelLhttp://social.msdn.microsoft.com/Profile/en-US/?user=TaylorMichaelLCould not load type '_Default'<p>The LIB stuff is only for C++.  </p> <p>It sounds like you are not copying all the necessary files to your web server.  Under the default v2 model for a web site you will copy all the files including the cs files to the web server.  The cs files will get compiled on the fly as needed by ASP.NET.  You can change the default settings through the project settings.  If you pre-compile your site then you'll need to be sure to copy the Bin\ directory and its files to the web server.</p> <p>Michael Taylor - 1/17/07<br><a title="http://p3net.mvps.org" href="http://p3net.mvps.org">http://p3net.mvps.org</a></p> <p> </p>Wed, 17 Jan 2007 18:25:24 Z2007-01-17T18:25:24Zhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#2e180238-85ee-49e2-9e0e-f48a4195f3abhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#2e180238-85ee-49e2-9e0e-f48a4195f3abChris Viahttp://social.msdn.microsoft.com/Profile/en-US/?user=Chris%20ViaCould not load type '_Default'<p>Thanks for your reply. I think I've got it working now. I had to use the following asp compiler command:</p> <p>aspnet_compiler -p &quot;D:\BuildManagerApp&quot; -f -v -u &quot;D:\Inetpub\wwwroot\BuildManager&quot;</p> <p>Then, it works. I don't have to move any files (including bin) or any of that. It seems to compile a DLL and then marker files for my code and place that in the IIS directory.</p>Wed, 17 Jan 2007 18:37:59 Z2007-01-17T18:37:59Zhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#44e669c4-ebfa-4455-b35d-2d6e1c53d759http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#44e669c4-ebfa-4455-b35d-2d6e1c53d759frederikmhttp://social.msdn.microsoft.com/Profile/en-US/?user=frederikmCould not load type '_Default'<p>Hi</p> <p>just a quick question,</p> <p>did you create your virtual directory by hand in iis or did you create it from within visual studio?</p> <p>I had a similar problem where the error i got was that asp.net could not find/create the global.asax type</p> <p>removing the virtual directory from iis and recreating if from within visual studio solved the issue</p> <p> </p> <p>Kind regards</p> <p> </p>Sun, 21 Jan 2007 22:48:10 Z2007-01-21T22:48:10Zhttp://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#c343497f-8be0-4358-bf4f-4356d2568159http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/72eba30d-450f-4729-86be-f4e887ee7788#c343497f-8be0-4358-bf4f-4356d2568159YouCanDoIthttp://social.msdn.microsoft.com/Profile/en-US/?user=YouCanDoItCould not load type '_Default'<p>In the setup project you create for your application, you must specify that the Primary output from the Project goes into the &quot;bin&quot; folder (click on the &quot;primary output&quot; and browse to &quot;bin&quot; in the Folder property) , otherwise IIS can't find it. Once the dll is in the bin folder, IIS finds it and loads it.</p>Tue, 15 Jul 2008 08:06:47 Z2008-07-15T08:06:47Z