[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Parser Error - Could not load type in IIS7.5 .NET 4 site

Posted on 2011-03-17
9
Medium Priority
?
1,539 Views
Last Modified: 2012-05-11
Hi Folks,

Just upgraded my website to Visual Studio 2010, changed the targeting to .NET4.

Built a deployment and installed it onto 2008R2 with .NET4 app pool and I'm getting the below error:

"Could not load type"

Any ideas? It runs fine on the dev machine.

thanks



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 'website.main'.

Source Error:


Line 1:  <%@ Master Language="VB" AutoEventWireup="false" CodeBehind="main.master.vb" Inherits="website.main" %>
Line 2:  
Line 3:  <?xml version="1.0" encoding="UTF-8"?>
 

Source File: /main.Master    Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
0
Comment
Question by:plq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 3

Expert Comment

by:AbdulQuddos
ID: 35154841
I think here is some issue:
CodeBehind="main.master.vb" Inherits="website.main" %>

Could you please past your .aspx and  code behind here to get into the issue..
0
 
LVL 8

Author Comment

by:plq
ID: 35154858
OK here's the top of default.aspx

<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/main.Master" CodeBehind="default.aspx.vb" Inherits="website._default"
    title="Some Title" %>

<%@ MasterType virtualPath="~/main.Master" %>

<%@ register src="xxxx.ascx" tagname="xxbutton" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
...      



And here's the top of main.Master



<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="main.master.vb" Inherits="website.main" %>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <title>Page Title</title>
      <link href="main.css" rel="stylesheet" type="text/css" />



<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /><!-- can't use text/xhtml because ie6 doesnt support it -->
<meta content="no-cache" http-equiv="Pragma" />
<meta name="keywords" content="xxxxxxxx" />
</head>

<script type="text/javascript" src="chat.js" ></script>

<body class="mainbody" onclick="try{bodyclick()} catch(e) {}" >



This has worked for years in .NET 2, and it works fine in .NET 4 on the dev machine, I get this error when its deployed out of the built msi on win2008r2. So I'm thinking its an IIS application or permissions issue

thanks


0
 
LVL 3

Expert Comment

by:AbdulQuddos
ID: 35154955
in case its IIS issue, I preferred to try
Application pool > Managed pipeline mode: Integrated/Classic
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Author Comment

by:plq
ID: 35154979
thanks I just tried that.

In iis 7.5 you don't get the option of "integrated/classic" - you can choose from integrated or classic but not both

When I switch to classic I get 404 page not found.
When I switch to integrated I get the original error message above
When I switch to a lower framework it raises an error about web.config entries

thanks
0
 
LVL 8

Author Comment

by:plq
ID: 35155016
BTW I've tried asp.net app pool and the app pool for the site itself. Both target 4.0 integrated. Both give the same error.

Both pools enable 32 bit and the app itself is compiled with 32 bit
0
 
LVL 3

Expert Comment

by:AbdulQuddos
ID: 35155024
yes that's what I mean you need you need to try either of these.

I also have faced the same kind of problem few days back.

I tried the classic mode and then do some fixation and in my case it works

if you are upgraded from 2.0 then you also try the classic mode then next find why its page not found.
0
 
LVL 3

Assisted Solution

by:AbdulQuddos
AbdulQuddos earned 2000 total points
ID: 35155032
move from IIS 6.0 to IIS7 gives to hard time to configure.
0
 
LVL 8

Accepted Solution

by:
plq earned 0 total points
ID: 35155168
Turned out that for some reason the deployment was placing the DLL website.dll into webfolder\bin\bin instead of webfolder\bin.

I presume this is a bug in the upgrade process of setup. Will investigate more now..
0
 
LVL 8

Author Closing Comment

by:plq
ID: 35205029
Yes the above is the answer.  The .NET upgrade engine when going from 2.0 to 4.0 changes the location of the bin file seemingly at random.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question