2
votes

I have built an application in ASP.NET 3.5 framework and it is working fine on localhost but when i am uploading it on my server the page gives an error on loading "Parser Error Message: Could not load type 'Default'." <%@ Page Language="C#" AutoEventWireup="true" Debug="true" CodeFile="Default.aspx.cs" Inherits="Default" %> so what should i do?

4
What is you code behind code look like? Is the class name is Default? (or _default).Fitzchak Yitzchaki

4 Answers

2
votes

This is a broad error and could be a lot of things. I would suggest hooking up some logging framework. ELMAH is fantastic and integrates in seconds. I have it hooked up to just email me and store the errors in memory, no DB overhead. http://code.google.com/p/elmah/

1
votes

ok, so i googled for this same error and landed up here. But i got the solution from here and i would like to share it.

SOLUTION Empty the bin folder. Build all the dependent class libraries and refer them in the main project and build the complete solution.

I did this and it worked like a charm for me !!

0
votes

You might have forgotten to publish the binaries of your application. Do the following: right-click your Web Site/Web Application project in the Solution Explorer window. Choose Publish..., select the local file system as output folder. Finally, copy the entire folder structure onto your production server.

0
votes

Moldy oldy thread but I stumbled here and have an answer. In IIS you need to have a folder setup as an Application and not just a Virtual Directory. If you have sub-folders, like /samples, then /samples/test1 and /samples/test2, each of the sub-folders must also be an application. Finally, make sure the Application Pool is set for your .NET release. The default might be 1.1 or 2.0. See if .NET 4 is installed and then create a pool for .NET4, unless you're targeting a downline framework. I know the OP said 3.5 but that was 2 years ago. :) HTH someone.