CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/21/2006 7:28:31 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 7 Views: 110 Favorited: 0 Favorite
8 Items, 1 Pages 1 |< << Go >> >|
dougal83
Asp.Net User
Could not load type '_Default'2/21/2006 7:28:31 PM

0

Hi,

I've made a basic ASP website using a master page.  I'm using Visual Web Dev. 2005 EE with .NET 2.0.  My page works fine locally but when I upload it to an ASP .NET host I get the following error:

Server Error in '/' Application.

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 '_Default'.

Source Error:

Line 1:  <%@ Page Language="C#" MasterPageFile="~/SiteTemplate.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title=":: Default Page ::" %>
Line 2: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Line 3: this is the default page!

Source File: \\genfs2\www40\dougal83\default.aspx    Line: 1


Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300

I have to say I've googled for a solution.  I have found over a hundred instances of this problem and none of them have an answer.  I have to say from where I'm sitting at this moment in time that the support for Visual Apps. and .NET seems pretty pathetic.  I hope someone can prove me absolutely wrong!

Bah humbug *Grumble
jcasp
Asp.Net User
Re: Could not load type '_Default'2/21/2006 7:46:02 PM

0

The problem is that your server is configured to use .NET version 1.1, not 2.0.  Following line indicates this problem:

Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300

You should configure the server to use 2.0 for the virtual root in question.  You can do this through IIS.  I'm assuming you have both 1.1 and 2.0 installed on your server.

Freakyuno
Asp.Net User
Re: Could not load type '_Default'2/21/2006 7:49:21 PM

0

It's telling you that it cant find the partial class Default in your codefile, this could be because you've renamed it, or the codefile itself isnt available, or doesnt have the correct permissions when it reaches the web server.  Generally this should be a compiled dll by the time it makes it to the server to be hosted.  When your running it on your local system, it's using VS's internal webserver and compiling it at run time.

Check to see that Default exists inside Default.aspx.cs, it should look something like this.

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

public partial class Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

}


Bryan Sampica
Foto's Starter Kit |
My Blog
dougal83
Asp.Net User
Re: Could not load type '_Default'2/21/2006 11:12:58 PM

0

Thanks for replying guys.

I believe I've tried rebuilding with .NET 1.1 if the following allows that:

c:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

Rebooting then rebuilding project.  I'll try to set the server up on .NET 2.0 in the mean time.


The default.aspx.cs file exists and contains everything you have said.  It's unaltered as I'd like to get the page showing before I start coding.  You mention the use of a compiled DLL... I'm not sure how to do that with Visual Web Dev. Express.  I'd be grateful if you can point me in the right direction.

Thanks for your time guys!

Freakyuno
Asp.Net User
Re: Could not load type '_Default'2/22/2006 1:25:20 PM

0

c:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

That just registered the 1.1 extensions in IIS, that doesnt have anything to do without running a 2.0 project on your IIS server.

VWD can only develop web applications for the .net framework 2.0.  Your going to need to go into IIS and specify that the site needs to use the 2.0 extensions.

To do this, open computer managment, expand the IIS node, expand the websites node, find your website in the list and right click on it, choosing properties.  There should be an ASP.NET tab as one of the options (if 2.0 is installed correctly)

On the ASP.NET tab, you can choose from a dropdown, specifying which version of asp.net to serve this application with.  When your done with that, go to the home directory tab, asp.net 2.0 and asp.net 1.1 should NOT be run in the same application pool, so  under the "Application Name" box, name it something more appropriate than "Default Application".  Then change it's app pool to something other than the DefaultApp Pool.  So you have a division between your 2.0 sites, and 1.1 sites.

 


Bryan Sampica
Foto's Starter Kit |
My Blog
dougal83
Asp.Net User
Re: Could not load type '_Default'2/23/2006 3:44:47 PM

0

Thanks for the help Freakyuno.

My current Host is waiting for the latest version of plesk to enable .NET 2.0 so I'll just sign up to a different host.

(Thanks SomeNewKid!  You're a star!)
jcasp
Asp.Net User
Re: Could not load type '_Default'2/23/2006 5:05:26 PM

0

dougal83 wrote:

(Thanks SomeNewKid!  You're a star!)

I hope you meant jcasp, 'cause I'm all lonely and sad... Sad [:(]

LOL  Wink [;)]

webengineer
Asp.Net User
Re: Could not load type '_Default' [:)] solution7/9/2007 3:46:45 PM

0

Angry ERROR could not load type "_default"  Angry  & Smile SOLUTION  Smile

Its a namespace issue !!!!
(Update wasnt complete or proper during convertion of a "website" to a "web project app")

==========================
MY SETTINGS
==========================

Using VS 2005 SP1
Web application configured in IIS to use Asp version: 2.0.50727

 

==========================
PART 1
==========================
Add a NEW webform (mine was webform1.aspx)
Open webform in HTML source mode and look at the inherits part of the  @page directive of the .aspx page
<%@ Page Language="VB" AutoEventWireup="false" Inherits="TEST.Overview"    EnableEventValidation="false" Codebehind="Overview.aspx.vb" %>

The Inerits is in the format of NAMESPACE.Classname   (my namespace was TEST)
(NOTE: the namespace on the inherits must match namespace name set in the assembly properties)

Now, change inherits of of the @PAGE on all the other .aspx  and .ascx  pages to match
 FOR EXAMPLE:
 <%@ Page Language="VB" AutoEventWireup="false" Inherits="TEST._Default" Codebehind="Default.aspx.vb" %>
 <%@ Page Language="VB" AutoEventWireup="false" Inherits="TEST.Login" Codebehind="Login.aspx.vb" %>
 


Now open the default.aspx.vb

 also put "public" on partial class
 ex. Partial Public Class _default

 Repeat for the other aspx.vb and ascx.vb pages

 

==========================
PART 2 (if there are ascx pages used)
==========================

Getting error of -- Type 'navbar' is not defined??? about ascx pages  (ex. a footer, nav bar, etc) !!!

For each page that use these controls (not the ascx page,itself)

 a) Open the aspx.designer.vb page of a page that refrences the ascx

 b) look for the reference to the aspx

  ex:  Protected WithEvents Footer1 As Global.Lib_Footer

 c) change the line to include the namespace  & save
 
  ex: Protected WithEvents Footer1 As Global.TEST.Lib_Footer

 

==========================
PART 3
==========================
 
 build project
 
 

 

8 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional IIS 7 Authors: Ken Schaefer, Jeff Cochran, Scott Forsyth, Rob Baugh, Mike Everest, Dennis Glendenning, Pages: 812, Published: 2008
Special edition using MS-DOS 6.22 Authors: Jim Cooper, Pages: 1022, Published: 2001
SQL Server 2005 T-SQL Recipes: A Problem-Solution Approach Authors: Joseph Sack, Pages: 733, Published: 2005
Oracle Application Server 10g Administration Handbook: Administration Handbook Authors: John Garmany, Donald K. Burleson, Pages: 382, Published: 2004
Mastering IIS7 Implementation and Administration Authors: John Paul Mueller, Pages: 364, Published: 2007
Web Accessibility: Web Standards and Regulatory Compliance Authors: Jim Thatcher, Michael R. Burks, Christian Heilemann, Shawn Lawton Henry, Pages: 648, Published: 2006
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
The Internet Encyclopedia Authors: Hossein Bidgoli, Pages: 944, Published: 2004

Web:
Parser Error: Could not load type '_Default'. - ASP.NET Forums I read http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306155 PRB: " Could not load type" error message when you browse to .aspx page by using ...
could not load type "_Default" In a similar version my aspx file with an expanded version of the C# code the same "could not load type "_Default" " does not occur. ...
Could not load type '_Default' No matter what I do, after it builds and I copy the files to the web server and navigate to the page, I get the Could not load type '_Default' error. ...
Could not load type '_Default'. : load, type, could Jan 3, 2006 ... I don't know why my aspx page is having trouble communicating to the code behind class. I just uploaded my project to my new server, ...
could not load type "_default" Talk about could not load type "_default" ... over there. i keep on getting error could not load type "_default". Code for ...
Application Development: Could not load type '_Default' Could not load type '_Default'. Server Error in '/DataListPage' Application. Parser Error Description: An error occurred during the parsing of a resource ...
PRB: "Could not load type" error message when you browse to .aspx ... Could not load type ' Namespace . PageName '. Back to the top ... http://msdn. microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/ ...
Could not load type _default in my VS 2008 web application project ... What I am doing wrong here? Parser Error Message: Could not load type ' HeartStartToolkit._Default'. Source Error: ...
Parser Error Message: Could not load type - ASP Free Parser Error Message: Could not load type- .NET Development. ... And I'm not changing any of the default code that is generated by VS. ...
CoderLab’s Blog » Parser Error Message: Could not load type ‘_Default’ Dec 20, 2006 ... Parser Error Message: Could not load type ‘_Default’. 20 12 2006. While developing a .Net web app in C# with Visual Studio 2005, ...

Videos:
LEARN TO PROGRAM IN VB.NET 2008 LESSEN1 CURRENT TIME ON FORM Gymjunnky.com Welcomes you to VB.NET 2008 this is tutorial 1 and my name is Gym_ In this tutorial I'm going to show you how to add the current ...
Thunderbird: il rapace delle mail un progetto di Christian Biasco in collaborazione con: Giancarlo Biasco, Franco, Paolo Melchiorre, Sebastiano Mestre, Francesca Terri, Andrea ...
The Graphing Calculator Story Google TechTalks August 1, 2006 Ron Avitzur ABSTRACT It's midnight. I've been working sixteen hours a day, seven days a week. I'm not ...
Bio::POD - a rapid mutation discovery software solution by ... Bio::POD (Prioritized Oligo Design) is a bioinformatics software application intended for researchers that need to manage small to medium datasets ...
Google I/O 2008 - Painless Python Part 2 of 2 Painless Python for Proficient Programmers Part II Alex Martelli (Google) Python is a popular very-high-level programming language, with a ...
Fight Club-drawn on ms paint Every one please show ur mates and leave comments, i want some advice, critisism, jst tell me wut u thot this is an amazing video fo me drawing ...
An Introduction to SQLite Google TechTalks May 31, 2006 Richard Hipp ABSTRACT SQLite is a small C library that implements a self-contained, embeddable, zero ...
Asus Rampage Extreme Motherboard ntroducing the new Asus Rampage Extreme X48 Socket 775 - the ultimate gaming/overclocking platform. If you're looking for ultra-realistic graphics ...
Literate functional testing Google London Test Automation Conference (LTAC) Google Tech Talks September 7th, 2006 Presenters: Robert Chatley and Tom White
Argentina's Economic Recovery: Four Years After the Meltdown Argentina's Economic Recovery: Four Years After the Meltdown, featuring CEPR co-director Mark Weisbrot and former IMF Research Director Michael ...






radiobuttonlist - disabling buttons

code problem - please help

menu - no link for a selected item

how can i call a button's onclick event in code?

urgent reply needed- regarding retreiving localid from http header

context, css, and asp.net oh my

video streaming session

interface

xp style menu

how do i find out if a string is empty

login error (sending data to database!)

can i use visual web developer 2005 express with sql server 2000?

problem in viewing the page

hide filename from url

search dand remove duplicate file names

number formatting disappears when writing to csv

graphics question

parser error, remote server.

how many process will run for more then twp asp.net apps

user logon domain recognition

double.tryparse

xml in a string

asp.net-how to create [user control], whose properties is color, and we can chose its color in panel of properties?

button event handler

form validation

how to convert a string to a specific codepage ?

iis out of control

required field based on dropdown selection

i want to list the online visitors

sql and table relations

   
  Privacy | Contact Us
All Times Are GMT