开发者

Parser error: Could not load type 'Default'

开发者 https://www.devze.com 2022-12-21 12:07 出处:网络
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

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="Defau开发者_如何学运维lt" %> so what should i do?


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/


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 !!


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消