Parser Error Message Could Not Load Type Global.asax.cs
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 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss 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 Parser Error Message: Could not load type 'TestMvcApplication.MvcApplication' up vote 144 down vote favorite 30 I am getting the following error on one of our production servers. Not sure why it is working on the DEV server? 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 'TestMvcApplication.MvcApplication'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="TestMvcApplication.MvcApplication" Language="C#" %> Source File: /global.asax Line: 1 Not sure if anybody came across this error before and how it was solved, but I have reached the end. Any help would be appreciated. I also need to mention that this is the published code, so all is compiled. Can there be something wrong with my compiler settings? .net asp.net-mvc share|improve this question edited Nov 28 '10 at 16:33 p.campbell 56.2k49187272 asked Oct 21 '09 at 5:07 Riaan Engelbrecht 814277 possible duplicate of Could not load type MvcApplication –Alexander Prokofyev Mar 17 '11 at 14:07 15 Exit Visual Studio & restart fixed it for me. –RickAndMSFT May 3 '13 at 18:05 delete global.asax file and add a new one, and you will be alright. –DotNetGeek Jul 8 '13 at 7:51 This happened to me when deploying a previously working application. Something in IIS (7) got into a bad state; resetting IIS fixed the problem. –BurnsBA Sep 21 at 12:34 add a comment| 38 Answers 38 active oldest votes 1 2 next up vote 150 down vote None of the other answers worked for me. I fixed my error by changing the web project's output path. I had had it set to bin\debug but the web project doesn't work unless the output path is set to simply "bin" share|improve this answer edited Jul 7 '15 at 19:25 Community♦ 11 answered Oct 13 '11 at 18:16 Brian Leeming 5,36431639 This was my problem, caused me so much grief because none of the other solutions here worked for me.. –Zack Dec 14 '11 at 18:07 3 +1 This was my prob
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 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss 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 http://stackoverflow.com/questions/1598829/parser-error-message-could-not-load-type-testmvcapplication-mvcapplication ASP.NET Error: Parser Error Message: Could not load type 'webmarketing' up vote 10 down vote favorite 5 After finishing the web application and publishing it online no matter I try I keep getting the following error, keep in mind that it runs locally as it should... Parser Error Message: Could not load type 'webmarketing'. I ran through that solution though supposedly I'm doing http://stackoverflow.com/questions/23220357/asp-net-error-parser-error-message-could-not-load-type-webmarketing the same as the solution, yet I'm still facing the same issue... ASP.NET Parser Error Cannot load code behind Here is the code behind: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace webmarketing { public partial class Masterpage : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { string admin = (string)Session["Admin"]; if (string.IsNullOrEmpty(admin)) { logout.Visible = false; } else { } } } } c# asp.net master-pages share|improve this question edited Apr 22 '14 at 13:53 asked Apr 22 '14 at 12:58 Mohammed Hanafy 80119 add a comment| 7 Answers 7 active oldest votes up vote 19 down vote accepted I had same problem before i just change CodeBehind to CodeFile and it worked.I remember it works in local but i had this problem after uploading. share|improve this answer answered Apr 22 '14 at 13:45 user3527150 286112 1 It answered with the following error: Compiler Error Message: CS0101: The namespace 'webmarketing' already contains a definition for 'Masterpage' –Mohammed Hanafy Apr 22 '14 at 13:50 Thanks it worked for me also.! –nad Nov 25 '14 at 8:40 Thanks
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 About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with http://stackoverflow.com/questions/54001/could-not-load-type-xxx-global us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss 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 type 'XXX.Global' up vote 47 down vote favorite 4 Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error. I don't actually need Global because I am not adding anything to it, but parser error after I remove it I get more errors. asp.net visual-studio share|improve this question edited Feb 1 '12 at 7:50 famousgarkin 7,23122951 asked Sep 10 '08 at 13:13 Brian G 14.9k47105134 add a comment| 16 Answers 16 active oldest votes up vote 43 down vote accepted There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems. If you are still using the IIS virtual directory make sure its pointed to the correct directory parser error message and also check the ASP.NET version it is set to, make sure it is set to ASP.NET 2.0. Clear out your bin/debug/obj all of them. Do a Clean solution and then a Build Solution. Check your project file in a text editor and make sure where its looking for the global file is correct, sometimes it doesnt change the directory. Remove the global from the solution and add it back after saving and closing. make sure all the script tags in the ASPX file point to the correct one after. You can try running the Convert to Web Application tool, that redoes all of the code and project files. IIS Express is using the wrong root directory (see answer in VS 2012 launching app based on wrong path) Make sure you close VS after you try them. Those are some things I know to try. Hope one of them works for you. share|improve this answer edited Nov 18 '14 at 20:25 josh poley 4,14511220 answered Sep 10 '08 at 13:25 pete blair 1,36711514 1 Did any of these work for you? –Rob Stevenson-Leggett Oct 22 '08 at 12:51 1 yeah i have used those over time and one of them would usually resolve the issue. –pete blair Oct 24 '08 at 18:28 1 Removing and re-adding Global.asax is what did the trick for me. –East of Nowhere Aug 15 '12 at 21:15 My Bin and Obj folders were excluded from the project... just used th