IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”
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
add a comment |
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
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
add a comment |
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
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
c# asp.net asp.net-mvc-3
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
add a comment |
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
add a comment |
12 Answers
12
active
oldest
votes
Solved, just renamed the Global.asax or delete it fixed the problem :/
Other known related bugs I found on the web:
Global.asax.cs: must inherit fromHttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
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
|
show 1 more comment
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#" %>
this work thanks
– code4j
Jan 4 '18 at 3:48
add a comment |
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
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
add a comment |
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.
changing to bin from binDebug worked for me
– aeroson
Mar 9 '18 at 9:24
add a comment |
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
add a comment |
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
add a comment |
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.
add a comment |
In my case my site on IIS was pointing to a different project than the one I was running on visual studio.
add a comment |
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!
add a comment |
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#" %>
add a comment |
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#" %>
add a comment |
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Solved, just renamed the Global.asax or delete it fixed the problem :/
Other known related bugs I found on the web:
Global.asax.cs: must inherit fromHttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
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
|
show 1 more comment
Solved, just renamed the Global.asax or delete it fixed the problem :/
Other known related bugs I found on the web:
Global.asax.cs: must inherit fromHttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
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
|
show 1 more comment
Solved, just renamed the Global.asax or delete it fixed the problem :/
Other known related bugs I found on the web:
Global.asax.cs: must inherit fromHttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
Solved, just renamed the Global.asax or delete it fixed the problem :/
Other known related bugs I found on the web:
Global.asax.cs: must inherit fromHttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
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
|
show 1 more comment
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
|
show 1 more comment
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#" %>
this work thanks
– code4j
Jan 4 '18 at 3:48
add a comment |
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#" %>
this work thanks
– code4j
Jan 4 '18 at 3:48
add a comment |
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#" %>
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#" %>
answered Jul 1 '17 at 12:09
intoxintox
188312
188312
this work thanks
– code4j
Jan 4 '18 at 3:48
add a comment |
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
changing to bin from binDebug worked for me
– aeroson
Mar 9 '18 at 9:24
add a comment |
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.
changing to bin from binDebug worked for me
– aeroson
Mar 9 '18 at 9:24
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
edited May 23 '17 at 12:24
Community♦
11
11
answered Dec 21 '15 at 20:48
MaheshMahesh
1,6502132
1,6502132
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Dec 14 '17 at 17:35
Sandeep KumarSandeep Kumar
8414
8414
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 28 '17 at 23:44
Semir DeljićSemir Deljić
1,3771917
1,3771917
add a comment |
add a comment |
In my case my site on IIS was pointing to a different project than the one I was running on visual studio.
add a comment |
In my case my site on IIS was pointing to a different project than the one I was running on visual studio.
add a comment |
In my case my site on IIS was pointing to a different project than the one I was running on visual studio.
In my case my site on IIS was pointing to a different project than the one I was running on visual studio.
answered Jan 8 '18 at 11:38
ConorConor
1461215
1461215
add a comment |
add a comment |
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!
add a comment |
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!
add a comment |
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!
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!
answered Mar 4 '18 at 7:22
Hamed MahdizadehHamed Mahdizadeh
1821412
1821412
add a comment |
add a comment |
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#" %>
add a comment |
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#" %>
add a comment |
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#" %>
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#" %>
edited Mar 25 '18 at 7:23
Generic
67011327
67011327
answered Mar 25 '18 at 5:04
babidibabidi
28644
28644
add a comment |
add a comment |
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#" %>
add a comment |
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#" %>
add a comment |
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#" %>
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#" %>
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
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
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
edited Jan 2 at 7:54
Zlytherin
1,9023829
1,9023829
answered Jan 2 at 7:21
nl Abdulnl Abdul
11
11
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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