Parser Error Message Could Not Load Type Ascx
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site application codebehind= global.asax.cs parser error About Us Learn more about Stack Overflow the company Business Learn more
Parser Error Global.asax Line 1
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Could Not Load Type Aspx
Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Could not load
An Error Occurred During The Parsing Of A Resource Required To Service This Request Asp Net
type 'User control' up vote 1 down vote favorite I have restored a site in sharepoint 2010. But when I run it, it pops the error about the user control. i.e. Could not load type 'Newsletter.Web.Applications.Subscribers.AddSubscriberStep1'. Here is the error description from LOG: System.Web.HttpException: Could not load type 'Newsletter.Web.Applications.Subscribers.AddSubscriberStep1'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) could not load type c# at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) ac3fc84c-11f3-46a0-bea5-930c43627627 I have deployed the project where that user control resides but still the same error. Where am I going wrong? Kindly assist me. asp.net sharepoint-2010 share|improve this question edited Sep 15 '14 at 6:23 asked Sep 15 '14 at 6:00 user1584253 1401316 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote The following example shows that for a Web UserControl, but it works the same for a Page, a Master Page and a WebPart: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="Controls_WebUserControl" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl.ascx.cs" Inherits="Controls_WebUserControl" %> That’s all you need to do to get rid of that annoying error! The reason? If you have an “ASP.NET Web Application”, Microsoft needs CodeBehind in the Page, Control or Master directive, if you have an “ASP.NET Web Site”, the compiler expects CodeFile instead. I have no idea why this difference exists, it is very annoying and you can stare forever at your code before you find it, but this is the solution for this scenario
have created a SubMenu, <%@ application codebehind="global.asax.cs" inherits=" mvcapplication" language="c#" %> however I am getting the error belowServer Error parser error message could not load type '_default' in '/' Application.--------------------------------------------------------------------------------Parser Error Description: An error occurred during the parsing of a could not load type 'web api.web api application' resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. http://stackoverflow.com/questions/25841669/could-not-load-type-user-control Parser Error Message: Could not load type 'EPiServer.Templates.RelatePlus.UserControls.SubMenu'.Source Error: Line 1: <%@ Control Language="C#" AutoEventWireup="false" CodeBehind="SubMenu.ascx.cs" Inherits="EPiServer.Templates.RelatePlus.UserControls.SubMenu" %>Line 2: Line 3: Source File: /Templates/RelatePlus/UserControls/SubMenu.ascx Line: 1 --------------------------------------------------------------------------------Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 By: Magnus Rahl May 27 2009, 7:41 http://world.episerver.com/Forum/Developer-forum/EPiServer-Relate/Thread-Container/2009/5/New-User-Control--Could-not-load-type-/ It looks like your assembly does not contain your newly created class. Did you rebuild the project? By: Tom Stenius May 27 2009, 20:01 Hi Saar,I would first of all check the namespace of your class SubMenu.cs, the namespace you be EPiServer.Templates.RelatePlus.UserControls and then make sure you have compiled the project.Best regards,Tom By: Saar Paamoni May 27 2009, 21:21 I think the namespace is ok, the build was good too SubMenu.ascx<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="SubMenu.ascx.cs" Inherits="EPiServer.Templates.RelatePlus.UserControls.SubMenu" %>SubMenu.ascx.csnamespace EPiServer.Templates.RelatePlus.UserControls By: Tom Stenius June 1 2009, 16:23 Hi Saar,It's seems like you were using the wrong type of project; Web Site instead of Web Application. Hopefully it will do the trick to change this! //Tom First 1 Last © Episerver 2016 | About Episerver World
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Installation and Setup/Parser Error: Could not load type '_Default'. Parser Error: Could not load type '_Default'. RSS 31 replies Last post Feb 02, 2012 11:48 AM by pickedaname https://forums.asp.net/t/906959.aspx?Parser+Error+Could+not+load+type+_Default+ ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply aellis None 0 Points 2 Posts Parser Error: Could not load type '_Default'. Aug 01, 2005 03:51 AM|aellis|LINK I have been developing an ASP.NET website in C# with Visual C# 2005 express on my laptop. It functions as expected with VWD's debug server and IIS which is set up could not locally, but when I transfer the files to an IIS site on another computer I get the following error. I've done some searching but haven't found the solution,I'd really appreciate any help on this ASAP. Regards, Alex Server Error in '/tracker' 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 could not load source file appropriately. Parser Error Message: Could not load type '_Default'. Source Error: Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> Line 2: Line 3: <% Source File: /tracker/Default.aspx Line: 1 Version Information:Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42 Reply marca None 0 Points 5 Posts Re: Parser Error: Could not load type '_Default'. Aug 06, 2005 09:22 AM|marca|LINK Same problem here. Can anybody help us? :-) /Martin Reply Mickster None 0 Points 3 Posts Re: Parser Error: Could not load type '_Default'. Aug 31, 2005 10:27 AM|Mickster|LINK Hi All [:)] I'm also getting the same problem. Any ideas ? Cheers Mickster Reply NateM None 0 Points 1 Post Re: Parser Error: Could not load type '_Default'. Sep 02, 2005 01:04 PM|NateM|LINK I was also hitting this error and just got around it this morning. However, I'm not sure if my solution will apply to you or not since I see your "Version Information" is already set to at least a higher version of the Framework than I had. Anyway, here's what I did: 1) Installed the same version of the Framework as what was on my laptop - my web server actually had the default Framework for 2k3. 2) Changed the web site configuration to use the ne