IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”












8















I am trying to deploy my web project and I keep getting this error:



Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %>


I looked at this post: Parser Error: Server Error in '/' Application



But it is currect in my project.



I suspect it something with my iis7 configuration.



Any ideas?



Global.asax:



<%@ Application Codebehind="Global.asax.cs" Inherits="tamal.pelecard.biz.MvcApplication" Language="C#" %>


Global.asax.cs:



namespace TamalTest
{
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
}
}


}










share|improve this question

























  • Anything more explicit in event viewer ?

    – Florian F.
    Jun 1 '14 at 12:04











  • Can you show your Global.asax.cs code

    – malkam
    Jun 1 '14 at 12:08











  • edited, please look

    – omri
    Jun 1 '14 at 12:16











  • is it exact code of file??

    – Ehsan Sajjad
    Jun 1 '14 at 12:31











  • ... yes, copy paste

    – omri
    Jun 1 '14 at 12:33
















8















I am trying to deploy my web project and I keep getting this error:



Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %>


I looked at this post: Parser Error: Server Error in '/' Application



But it is currect in my project.



I suspect it something with my iis7 configuration.



Any ideas?



Global.asax:



<%@ Application Codebehind="Global.asax.cs" Inherits="tamal.pelecard.biz.MvcApplication" Language="C#" %>


Global.asax.cs:



namespace TamalTest
{
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
}
}


}










share|improve this question

























  • Anything more explicit in event viewer ?

    – Florian F.
    Jun 1 '14 at 12:04











  • Can you show your Global.asax.cs code

    – malkam
    Jun 1 '14 at 12:08











  • edited, please look

    – omri
    Jun 1 '14 at 12:16











  • is it exact code of file??

    – Ehsan Sajjad
    Jun 1 '14 at 12:31











  • ... yes, copy paste

    – omri
    Jun 1 '14 at 12:33














8












8








8


1






I am trying to deploy my web project and I keep getting this error:



Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %>


I looked at this post: Parser Error: Server Error in '/' Application



But it is currect in my project.



I suspect it something with my iis7 configuration.



Any ideas?



Global.asax:



<%@ Application Codebehind="Global.asax.cs" Inherits="tamal.pelecard.biz.MvcApplication" Language="C#" %>


Global.asax.cs:



namespace TamalTest
{
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
}
}


}










share|improve this question
















I am trying to deploy my web project and I keep getting this error:



Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %>


I looked at this post: Parser Error: Server Error in '/' Application



But it is currect in my project.



I suspect it something with my iis7 configuration.



Any ideas?



Global.asax:



<%@ Application Codebehind="Global.asax.cs" Inherits="tamal.pelecard.biz.MvcApplication" Language="C#" %>


Global.asax.cs:



namespace TamalTest
{
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
}
}


}







c# asp.net asp.net-mvc-3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 23 '17 at 12:01









Community

11




11










asked Jun 1 '14 at 12:02









omriomri

2951312




2951312













  • Anything more explicit in event viewer ?

    – Florian F.
    Jun 1 '14 at 12:04











  • Can you show your Global.asax.cs code

    – malkam
    Jun 1 '14 at 12:08











  • edited, please look

    – omri
    Jun 1 '14 at 12:16











  • is it exact code of file??

    – Ehsan Sajjad
    Jun 1 '14 at 12:31











  • ... yes, copy paste

    – omri
    Jun 1 '14 at 12:33



















  • Anything more explicit in event viewer ?

    – Florian F.
    Jun 1 '14 at 12:04











  • Can you show your Global.asax.cs code

    – malkam
    Jun 1 '14 at 12:08











  • edited, please look

    – omri
    Jun 1 '14 at 12:16











  • is it exact code of file??

    – Ehsan Sajjad
    Jun 1 '14 at 12:31











  • ... yes, copy paste

    – omri
    Jun 1 '14 at 12:33

















Anything more explicit in event viewer ?

– Florian F.
Jun 1 '14 at 12:04





Anything more explicit in event viewer ?

– Florian F.
Jun 1 '14 at 12:04













Can you show your Global.asax.cs code

– malkam
Jun 1 '14 at 12:08





Can you show your Global.asax.cs code

– malkam
Jun 1 '14 at 12:08













edited, please look

– omri
Jun 1 '14 at 12:16





edited, please look

– omri
Jun 1 '14 at 12:16













is it exact code of file??

– Ehsan Sajjad
Jun 1 '14 at 12:31





is it exact code of file??

– Ehsan Sajjad
Jun 1 '14 at 12:31













... yes, copy paste

– omri
Jun 1 '14 at 12:33





... yes, copy paste

– omri
Jun 1 '14 at 12:33












12 Answers
12






active

oldest

votes


















22














Solved, just renamed the Global.asax or delete it fixed the problem :/



Other known related bugs I found on the web:





  1. Global.asax.cs: must inherit from HttpApplication -> public class MvcApplication : HttpApplication

  2. Project output must be the bin folder and not Bin/Debug, etc.

  3. Iss application pool is not in the correct .net version.






share|improve this answer


























  • As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

    – Anton Anikeev
    Apr 25 '17 at 14:09






  • 3





    Number 2 above solved my issue

    – Lee Cordell
    Jun 15 '17 at 13:23











  • What ? why i shouldn't be using bin/debug ?

    – L.Trabacchin
    Jan 10 '18 at 16:42






  • 4





    Number 2 point will solve the issue. It worked for me

    – Ashok Patel
    Feb 2 '18 at 5:12






  • 2





    Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

    – Nathan
    May 8 '18 at 18:41



















5














You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit



<%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>



to



<%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>






share|improve this answer
























  • this work thanks

    – code4j
    Jan 4 '18 at 3:48



















3














It may occur due to the clean solution.The dlls in the bin will be removed.
1.Clean Solution
2.Rebuild the solution
3.If the build process have failed,not all the necessary dlls will be stored in the bin.
This is another scenario where the error occurs






share|improve this answer
























  • This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

    – ransems
    Mar 12 '18 at 9:49



















2














It's quite weird. Every time I face this issue, have different solution. This time all of the previous fixes failed then I changed project output path from Bin to ..BuildBin. It failed. Reverted output path to the previous value , i.e., Bin fixed the issue.






share|improve this answer
























  • changing to bin from binDebug worked for me

    – aeroson
    Mar 9 '18 at 9:24





















1














Problem could occur if you have changed the namespace of your project.



Change the Namespace from Project Properties and also replace all old Namespace with new ones. Renaming to correct namespace might fix the issue.



Source






share|improve this answer

































    0














    I was also getting this error, I deleted dlls from my debug folder and when I started a new instance for debug I got this error. For me the issue was due to the the build setting, Release was selected in the build type, I just changed it to debug and then application was working fine






    share|improve this answer































      0














      In my case problem occurred after namespace renaming. I didn't use external tool like Re-sharper, I did renaming manually.



      In that process, Views/Web.config file was left unchanged. After replacing old namespace name with the new one in this file, the error disappeared.






      share|improve this answer































        0














        In my case my site on IIS was pointing to a different project than the one I was running on visual studio.






        share|improve this answer































          0














          I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!






          share|improve this answer































            0














            Make sure the Inherits is pointing to the right namespace of the class because when you create an MVC project under a solution the Inherits value will miss the project name. Therefore you need to fill the gap(project name) manually.



            <br><br><%@ Application Codebehind="Global.asax.cs" Inherits="solutionName.projectName.MvcApplication" Language="C#" %>





            share|improve this answer

































              0














              In my case, I copied the project and pasted it as another project. The Global.asax file contains the wrong file name, so I just change



              <%@ Application Codebehind="Global.asax.cs" 
              Inherits="WrongAppname.MvcApplication" Language="C#" %>


              to



              <%@ Application Codebehind="Global.asax.cs" 
              Inherits="RightAppName.MvcApplication" Language="C#" %>





              share|improve this answer

































                0














                I faced similar error, tried all the suggestions above, but did not resolve. what worked for me is this:



                Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.



                Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:



                namespace nadeem
                {

                public class MvcApplication: System.Web.HttpApplication
                {
                ....


                But if it doesn't look like above, you will receive that error, The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.



                Check below link for more info:



                Parser Error: Server Error in '/' Application






                share|improve this answer

























                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23979646%2fiis-error-application-codebehind-global-asax-cs-inherits-nadeem-mvcapplicati%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  12 Answers
                  12






                  active

                  oldest

                  votes








                  12 Answers
                  12






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  22














                  Solved, just renamed the Global.asax or delete it fixed the problem :/



                  Other known related bugs I found on the web:





                  1. Global.asax.cs: must inherit from HttpApplication -> public class MvcApplication : HttpApplication

                  2. Project output must be the bin folder and not Bin/Debug, etc.

                  3. Iss application pool is not in the correct .net version.






                  share|improve this answer


























                  • As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                    – Anton Anikeev
                    Apr 25 '17 at 14:09






                  • 3





                    Number 2 above solved my issue

                    – Lee Cordell
                    Jun 15 '17 at 13:23











                  • What ? why i shouldn't be using bin/debug ?

                    – L.Trabacchin
                    Jan 10 '18 at 16:42






                  • 4





                    Number 2 point will solve the issue. It worked for me

                    – Ashok Patel
                    Feb 2 '18 at 5:12






                  • 2





                    Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                    – Nathan
                    May 8 '18 at 18:41
















                  22














                  Solved, just renamed the Global.asax or delete it fixed the problem :/



                  Other known related bugs I found on the web:





                  1. Global.asax.cs: must inherit from HttpApplication -> public class MvcApplication : HttpApplication

                  2. Project output must be the bin folder and not Bin/Debug, etc.

                  3. Iss application pool is not in the correct .net version.






                  share|improve this answer


























                  • As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                    – Anton Anikeev
                    Apr 25 '17 at 14:09






                  • 3





                    Number 2 above solved my issue

                    – Lee Cordell
                    Jun 15 '17 at 13:23











                  • What ? why i shouldn't be using bin/debug ?

                    – L.Trabacchin
                    Jan 10 '18 at 16:42






                  • 4





                    Number 2 point will solve the issue. It worked for me

                    – Ashok Patel
                    Feb 2 '18 at 5:12






                  • 2





                    Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                    – Nathan
                    May 8 '18 at 18:41














                  22












                  22








                  22







                  Solved, just renamed the Global.asax or delete it fixed the problem :/



                  Other known related bugs I found on the web:





                  1. Global.asax.cs: must inherit from HttpApplication -> public class MvcApplication : HttpApplication

                  2. Project output must be the bin folder and not Bin/Debug, etc.

                  3. Iss application pool is not in the correct .net version.






                  share|improve this answer















                  Solved, just renamed the Global.asax or delete it fixed the problem :/



                  Other known related bugs I found on the web:





                  1. Global.asax.cs: must inherit from HttpApplication -> public class MvcApplication : HttpApplication

                  2. Project output must be the bin folder and not Bin/Debug, etc.

                  3. Iss application pool is not in the correct .net version.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 16 '16 at 12:58









                  RousseauAlexandre

                  6231115




                  6231115










                  answered Jun 1 '14 at 13:59









                  omriomri

                  2951312




                  2951312













                  • As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                    – Anton Anikeev
                    Apr 25 '17 at 14:09






                  • 3





                    Number 2 above solved my issue

                    – Lee Cordell
                    Jun 15 '17 at 13:23











                  • What ? why i shouldn't be using bin/debug ?

                    – L.Trabacchin
                    Jan 10 '18 at 16:42






                  • 4





                    Number 2 point will solve the issue. It worked for me

                    – Ashok Patel
                    Feb 2 '18 at 5:12






                  • 2





                    Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                    – Nathan
                    May 8 '18 at 18:41



















                  • As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                    – Anton Anikeev
                    Apr 25 '17 at 14:09






                  • 3





                    Number 2 above solved my issue

                    – Lee Cordell
                    Jun 15 '17 at 13:23











                  • What ? why i shouldn't be using bin/debug ?

                    – L.Trabacchin
                    Jan 10 '18 at 16:42






                  • 4





                    Number 2 point will solve the issue. It worked for me

                    – Ashok Patel
                    Feb 2 '18 at 5:12






                  • 2





                    Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                    – Nathan
                    May 8 '18 at 18:41

















                  As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                  – Anton Anikeev
                  Apr 25 '17 at 14:09





                  As for me have different class name in Global.asax.cs and in Global.asax markup. This answer help me.

                  – Anton Anikeev
                  Apr 25 '17 at 14:09




                  3




                  3





                  Number 2 above solved my issue

                  – Lee Cordell
                  Jun 15 '17 at 13:23





                  Number 2 above solved my issue

                  – Lee Cordell
                  Jun 15 '17 at 13:23













                  What ? why i shouldn't be using bin/debug ?

                  – L.Trabacchin
                  Jan 10 '18 at 16:42





                  What ? why i shouldn't be using bin/debug ?

                  – L.Trabacchin
                  Jan 10 '18 at 16:42




                  4




                  4





                  Number 2 point will solve the issue. It worked for me

                  – Ashok Patel
                  Feb 2 '18 at 5:12





                  Number 2 point will solve the issue. It worked for me

                  – Ashok Patel
                  Feb 2 '18 at 5:12




                  2




                  2





                  Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                  – Nathan
                  May 8 '18 at 18:41





                  Thanks! This is exactly what I was looking for. I just changed my project output folder to bin and it started working again!

                  – Nathan
                  May 8 '18 at 18:41













                  5














                  You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>



                  to



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>






                  share|improve this answer
























                  • this work thanks

                    – code4j
                    Jan 4 '18 at 3:48
















                  5














                  You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>



                  to



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>






                  share|improve this answer
























                  • this work thanks

                    – code4j
                    Jan 4 '18 at 3:48














                  5












                  5








                  5







                  You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>



                  to



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>






                  share|improve this answer













                  You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>



                  to



                  <%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 1 '17 at 12:09









                  intoxintox

                  188312




                  188312













                  • this work thanks

                    – code4j
                    Jan 4 '18 at 3:48



















                  • this work thanks

                    – code4j
                    Jan 4 '18 at 3:48

















                  this work thanks

                  – code4j
                  Jan 4 '18 at 3:48





                  this work thanks

                  – code4j
                  Jan 4 '18 at 3:48











                  3














                  It may occur due to the clean solution.The dlls in the bin will be removed.
                  1.Clean Solution
                  2.Rebuild the solution
                  3.If the build process have failed,not all the necessary dlls will be stored in the bin.
                  This is another scenario where the error occurs






                  share|improve this answer
























                  • This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                    – ransems
                    Mar 12 '18 at 9:49
















                  3














                  It may occur due to the clean solution.The dlls in the bin will be removed.
                  1.Clean Solution
                  2.Rebuild the solution
                  3.If the build process have failed,not all the necessary dlls will be stored in the bin.
                  This is another scenario where the error occurs






                  share|improve this answer
























                  • This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                    – ransems
                    Mar 12 '18 at 9:49














                  3












                  3








                  3







                  It may occur due to the clean solution.The dlls in the bin will be removed.
                  1.Clean Solution
                  2.Rebuild the solution
                  3.If the build process have failed,not all the necessary dlls will be stored in the bin.
                  This is another scenario where the error occurs






                  share|improve this answer













                  It may occur due to the clean solution.The dlls in the bin will be removed.
                  1.Clean Solution
                  2.Rebuild the solution
                  3.If the build process have failed,not all the necessary dlls will be stored in the bin.
                  This is another scenario where the error occurs







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 20 '17 at 9:57









                  Pradeep GokulPradeep Gokul

                  312




                  312













                  • This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                    – ransems
                    Mar 12 '18 at 9:49



















                  • This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                    – ransems
                    Mar 12 '18 at 9:49

















                  This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                  – ransems
                  Mar 12 '18 at 9:49





                  This is closer to why I think the answer is correct. I just published and looks like the debug files I had been using previously had been cleaned for the release compile and publish. Error was fixed once I recompiled as debug mode, as that is where my local website was running from.

                  – ransems
                  Mar 12 '18 at 9:49











                  2














                  It's quite weird. Every time I face this issue, have different solution. This time all of the previous fixes failed then I changed project output path from Bin to ..BuildBin. It failed. Reverted output path to the previous value , i.e., Bin fixed the issue.






                  share|improve this answer
























                  • changing to bin from binDebug worked for me

                    – aeroson
                    Mar 9 '18 at 9:24


















                  2














                  It's quite weird. Every time I face this issue, have different solution. This time all of the previous fixes failed then I changed project output path from Bin to ..BuildBin. It failed. Reverted output path to the previous value , i.e., Bin fixed the issue.






                  share|improve this answer
























                  • changing to bin from binDebug worked for me

                    – aeroson
                    Mar 9 '18 at 9:24
















                  2












                  2








                  2







                  It's quite weird. Every time I face this issue, have different solution. This time all of the previous fixes failed then I changed project output path from Bin to ..BuildBin. It failed. Reverted output path to the previous value , i.e., Bin fixed the issue.






                  share|improve this answer













                  It's quite weird. Every time I face this issue, have different solution. This time all of the previous fixes failed then I changed project output path from Bin to ..BuildBin. It failed. Reverted output path to the previous value , i.e., Bin fixed the issue.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 11 '16 at 21:16









                  WSKWSK

                  2,26763661




                  2,26763661













                  • changing to bin from binDebug worked for me

                    – aeroson
                    Mar 9 '18 at 9:24





















                  • changing to bin from binDebug worked for me

                    – aeroson
                    Mar 9 '18 at 9:24



















                  changing to bin from binDebug worked for me

                  – aeroson
                  Mar 9 '18 at 9:24







                  changing to bin from binDebug worked for me

                  – aeroson
                  Mar 9 '18 at 9:24













                  1














                  Problem could occur if you have changed the namespace of your project.



                  Change the Namespace from Project Properties and also replace all old Namespace with new ones. Renaming to correct namespace might fix the issue.



                  Source






                  share|improve this answer






























                    1














                    Problem could occur if you have changed the namespace of your project.



                    Change the Namespace from Project Properties and also replace all old Namespace with new ones. Renaming to correct namespace might fix the issue.



                    Source






                    share|improve this answer




























                      1












                      1








                      1







                      Problem could occur if you have changed the namespace of your project.



                      Change the Namespace from Project Properties and also replace all old Namespace with new ones. Renaming to correct namespace might fix the issue.



                      Source






                      share|improve this answer















                      Problem could occur if you have changed the namespace of your project.



                      Change the Namespace from Project Properties and also replace all old Namespace with new ones. Renaming to correct namespace might fix the issue.



                      Source







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited May 23 '17 at 12:24









                      Community

                      11




                      11










                      answered Dec 21 '15 at 20:48









                      MaheshMahesh

                      1,6502132




                      1,6502132























                          0














                          I was also getting this error, I deleted dlls from my debug folder and when I started a new instance for debug I got this error. For me the issue was due to the the build setting, Release was selected in the build type, I just changed it to debug and then application was working fine






                          share|improve this answer




























                            0














                            I was also getting this error, I deleted dlls from my debug folder and when I started a new instance for debug I got this error. For me the issue was due to the the build setting, Release was selected in the build type, I just changed it to debug and then application was working fine






                            share|improve this answer


























                              0












                              0








                              0







                              I was also getting this error, I deleted dlls from my debug folder and when I started a new instance for debug I got this error. For me the issue was due to the the build setting, Release was selected in the build type, I just changed it to debug and then application was working fine






                              share|improve this answer













                              I was also getting this error, I deleted dlls from my debug folder and when I started a new instance for debug I got this error. For me the issue was due to the the build setting, Release was selected in the build type, I just changed it to debug and then application was working fine







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Dec 14 '17 at 17:35









                              Sandeep KumarSandeep Kumar

                              8414




                              8414























                                  0














                                  In my case problem occurred after namespace renaming. I didn't use external tool like Re-sharper, I did renaming manually.



                                  In that process, Views/Web.config file was left unchanged. After replacing old namespace name with the new one in this file, the error disappeared.






                                  share|improve this answer




























                                    0














                                    In my case problem occurred after namespace renaming. I didn't use external tool like Re-sharper, I did renaming manually.



                                    In that process, Views/Web.config file was left unchanged. After replacing old namespace name with the new one in this file, the error disappeared.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      In my case problem occurred after namespace renaming. I didn't use external tool like Re-sharper, I did renaming manually.



                                      In that process, Views/Web.config file was left unchanged. After replacing old namespace name with the new one in this file, the error disappeared.






                                      share|improve this answer













                                      In my case problem occurred after namespace renaming. I didn't use external tool like Re-sharper, I did renaming manually.



                                      In that process, Views/Web.config file was left unchanged. After replacing old namespace name with the new one in this file, the error disappeared.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Dec 28 '17 at 23:44









                                      Semir DeljićSemir Deljić

                                      1,3771917




                                      1,3771917























                                          0














                                          In my case my site on IIS was pointing to a different project than the one I was running on visual studio.






                                          share|improve this answer




























                                            0














                                            In my case my site on IIS was pointing to a different project than the one I was running on visual studio.






                                            share|improve this answer


























                                              0












                                              0








                                              0







                                              In my case my site on IIS was pointing to a different project than the one I was running on visual studio.






                                              share|improve this answer













                                              In my case my site on IIS was pointing to a different project than the one I was running on visual studio.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Jan 8 '18 at 11:38









                                              ConorConor

                                              1461215




                                              1461215























                                                  0














                                                  I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!






                                                  share|improve this answer




























                                                    0














                                                    I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!






                                                    share|improve this answer


























                                                      0












                                                      0








                                                      0







                                                      I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!






                                                      share|improve this answer













                                                      I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Mar 4 '18 at 7:22









                                                      Hamed MahdizadehHamed Mahdizadeh

                                                      1821412




                                                      1821412























                                                          0














                                                          Make sure the Inherits is pointing to the right namespace of the class because when you create an MVC project under a solution the Inherits value will miss the project name. Therefore you need to fill the gap(project name) manually.



                                                          <br><br><%@ Application Codebehind="Global.asax.cs" Inherits="solutionName.projectName.MvcApplication" Language="C#" %>





                                                          share|improve this answer






























                                                            0














                                                            Make sure the Inherits is pointing to the right namespace of the class because when you create an MVC project under a solution the Inherits value will miss the project name. Therefore you need to fill the gap(project name) manually.



                                                            <br><br><%@ Application Codebehind="Global.asax.cs" Inherits="solutionName.projectName.MvcApplication" Language="C#" %>





                                                            share|improve this answer




























                                                              0












                                                              0








                                                              0







                                                              Make sure the Inherits is pointing to the right namespace of the class because when you create an MVC project under a solution the Inherits value will miss the project name. Therefore you need to fill the gap(project name) manually.



                                                              <br><br><%@ Application Codebehind="Global.asax.cs" Inherits="solutionName.projectName.MvcApplication" Language="C#" %>





                                                              share|improve this answer















                                                              Make sure the Inherits is pointing to the right namespace of the class because when you create an MVC project under a solution the Inherits value will miss the project name. Therefore you need to fill the gap(project name) manually.



                                                              <br><br><%@ Application Codebehind="Global.asax.cs" Inherits="solutionName.projectName.MvcApplication" Language="C#" %>






                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Mar 25 '18 at 7:23









                                                              Generic

                                                              67011327




                                                              67011327










                                                              answered Mar 25 '18 at 5:04









                                                              babidibabidi

                                                              28644




                                                              28644























                                                                  0














                                                                  In my case, I copied the project and pasted it as another project. The Global.asax file contains the wrong file name, so I just change



                                                                  <%@ Application Codebehind="Global.asax.cs" 
                                                                  Inherits="WrongAppname.MvcApplication" Language="C#" %>


                                                                  to



                                                                  <%@ Application Codebehind="Global.asax.cs" 
                                                                  Inherits="RightAppName.MvcApplication" Language="C#" %>





                                                                  share|improve this answer






























                                                                    0














                                                                    In my case, I copied the project and pasted it as another project. The Global.asax file contains the wrong file name, so I just change



                                                                    <%@ Application Codebehind="Global.asax.cs" 
                                                                    Inherits="WrongAppname.MvcApplication" Language="C#" %>


                                                                    to



                                                                    <%@ Application Codebehind="Global.asax.cs" 
                                                                    Inherits="RightAppName.MvcApplication" Language="C#" %>





                                                                    share|improve this answer




























                                                                      0












                                                                      0








                                                                      0







                                                                      In my case, I copied the project and pasted it as another project. The Global.asax file contains the wrong file name, so I just change



                                                                      <%@ Application Codebehind="Global.asax.cs" 
                                                                      Inherits="WrongAppname.MvcApplication" Language="C#" %>


                                                                      to



                                                                      <%@ Application Codebehind="Global.asax.cs" 
                                                                      Inherits="RightAppName.MvcApplication" Language="C#" %>





                                                                      share|improve this answer















                                                                      In my case, I copied the project and pasted it as another project. The Global.asax file contains the wrong file name, so I just change



                                                                      <%@ Application Codebehind="Global.asax.cs" 
                                                                      Inherits="WrongAppname.MvcApplication" Language="C#" %>


                                                                      to



                                                                      <%@ Application Codebehind="Global.asax.cs" 
                                                                      Inherits="RightAppName.MvcApplication" Language="C#" %>






                                                                      share|improve this answer














                                                                      share|improve this answer



                                                                      share|improve this answer








                                                                      edited May 8 '18 at 13:35









                                                                      Jesse de Bruijne

                                                                      2,55361428




                                                                      2,55361428










                                                                      answered May 8 '18 at 13:01









                                                                      Burak AtlıBurak Atlı

                                                                      11




                                                                      11























                                                                          0














                                                                          I faced similar error, tried all the suggestions above, but did not resolve. what worked for me is this:



                                                                          Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.



                                                                          Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:



                                                                          namespace nadeem
                                                                          {

                                                                          public class MvcApplication: System.Web.HttpApplication
                                                                          {
                                                                          ....


                                                                          But if it doesn't look like above, you will receive that error, The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.



                                                                          Check below link for more info:



                                                                          Parser Error: Server Error in '/' Application






                                                                          share|improve this answer






























                                                                            0














                                                                            I faced similar error, tried all the suggestions above, but did not resolve. what worked for me is this:



                                                                            Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.



                                                                            Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:



                                                                            namespace nadeem
                                                                            {

                                                                            public class MvcApplication: System.Web.HttpApplication
                                                                            {
                                                                            ....


                                                                            But if it doesn't look like above, you will receive that error, The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.



                                                                            Check below link for more info:



                                                                            Parser Error: Server Error in '/' Application






                                                                            share|improve this answer




























                                                                              0












                                                                              0








                                                                              0







                                                                              I faced similar error, tried all the suggestions above, but did not resolve. what worked for me is this:



                                                                              Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.



                                                                              Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:



                                                                              namespace nadeem
                                                                              {

                                                                              public class MvcApplication: System.Web.HttpApplication
                                                                              {
                                                                              ....


                                                                              But if it doesn't look like above, you will receive that error, The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.



                                                                              Check below link for more info:



                                                                              Parser Error: Server Error in '/' Application






                                                                              share|improve this answer















                                                                              I faced similar error, tried all the suggestions above, but did not resolve. what worked for me is this:



                                                                              Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.



                                                                              Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:



                                                                              namespace nadeem
                                                                              {

                                                                              public class MvcApplication: System.Web.HttpApplication
                                                                              {
                                                                              ....


                                                                              But if it doesn't look like above, you will receive that error, The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.



                                                                              Check below link for more info:



                                                                              Parser Error: Server Error in '/' Application







                                                                              share|improve this answer














                                                                              share|improve this answer



                                                                              share|improve this answer








                                                                              edited Jan 2 at 7:54









                                                                              Zlytherin

                                                                              1,9023829




                                                                              1,9023829










                                                                              answered Jan 2 at 7:21









                                                                              nl Abdulnl Abdul

                                                                              11




                                                                              11






























                                                                                  draft saved

                                                                                  draft discarded




















































                                                                                  Thanks for contributing an answer to Stack Overflow!


                                                                                  • Please be sure to answer the question. Provide details and share your research!

                                                                                  But avoid



                                                                                  • Asking for help, clarification, or responding to other answers.

                                                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                                                  To learn more, see our tips on writing great answers.




                                                                                  draft saved


                                                                                  draft discarded














                                                                                  StackExchange.ready(
                                                                                  function () {
                                                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23979646%2fiis-error-application-codebehind-global-asax-cs-inherits-nadeem-mvcapplicati%23new-answer', 'question_page');
                                                                                  }
                                                                                  );

                                                                                  Post as a guest















                                                                                  Required, but never shown





















































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown

































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown







                                                                                  Popular posts from this blog

                                                                                  'app-layout' is not a known element: how to share Component with different Modules

                                                                                  android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                                                                                  WPF add header to Image with URL pettitions [duplicate]