could not load type "_default"

M

M

Hi There,
I am having lot of trouble getting out the ASP.NET "dll hell", i hope i
can find the help here. i have coded a simple page using Visual Studio
compiled it. keep on getting works on my computer but when i put this page
on the test sever online on which i have very control and can't recompile
over there. i keep on getting error could not load type "_default". Code for
the page is as follows

<!------------------------- HTML PAGE -------------------------------->
<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false"
Inherits="_default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>default</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="default" method="post" runat="server">
<P>Welcome to kapurs Site</P>
<P>This is a test page</P>
<P>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>&nbsp;
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox></P>
<P>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P>
</form>
</body>
</HTML>

<!---------------------------------------------------------------CODE
BEHIND ------------------------------------->
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public class _default : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.Button Button1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{
TextBox2.Text = TextBox1.Text ;
TextBox1.Text = "";
}
}
<!--------------------------------------------------------------------------
------------------------------------->

i tried the copy method of the visual studio still same error. i made sure
that there is the dll file in the bin dir which was created when i compiled
the project in VS .net.
My App is named "TestApp1" and dll in the bin is also by that name. i works
fine on my computer when i copy it to some other web folder(virtual
directory app). not when i put on the test server.
my test server is at Hostopia.com which is also in interesting things, they
have Unix and Windows app coexist.

any help would be greatly appreciated

Thanks
m
 
Joined
Jul 24, 2006
Messages
1
Reaction score
0
error on .net when calling it from another computer

Reason:
- You would tipically receive this error when you have multiple versions of .Net Framework.
- In case of BizTalk Server 2006 you may receive this error when you try to access web services created via the "BizTalk WebService Publishing Wizard".

Resolution:
- Launch IIS
- Go to the properties page for the application.
- Select "Asp.net" tab, and change the Target Framework to 2.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top