14

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?

tripleee
  • 175,061
  • 34
  • 275
  • 318
Gerardo Abdo
  • 1,150
  • 3
  • 10
  • 16

4 Answers4

39

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

salihcenap
  • 1,927
  • 22
  • 25
5

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

Alisettar Huseynli
  • 944
  • 1
  • 11
  • 24
1

Are you sure you uploaded the compiled .dll files in the /bin folder for the site?

Lance McNearney
  • 9,410
  • 4
  • 49
  • 55
0

What the class name for your designer file? Does it match "_default" and is it in the namespace "testDemo"?

citronas
  • 19,035
  • 27
  • 96
  • 164