Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load type 'site._Default' [closed]

Tags:

asp.net

web

I have develop a simple website using VS8 and C# when I debug everything works fine, then I built using Ctrl + Shift + B and when I upload the site to a godaddy server it display the next error:


Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'testDemo._Default'.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="testDemo._Default"%> Line 2:
Line 3:


A solution I found is removing the part Inherits="testDemo._Default", but when debuging it does not execute the "Page_Load(object sender, EventArgs e)".

Does anyone knows what is causing this error?

like image 686
Gerardo Abdo Avatar asked Mar 06 '10 20:03

Gerardo Abdo


2 Answers

Simply change "CodeBehind" to "CodeFile" on your Line1

like image 87
salihcenap Avatar answered Nov 02 '22 02:11

salihcenap


In IIS right click on your website and select "Convert to Application" it may solve your problem. I had same problem with virtual directory under my main website

like image 5
Alisettar Huseynli Avatar answered Nov 02 '22 00:11

Alisettar Huseynli