• Register
0 votes
112 views

Problem :

I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error:

"The page cannot be displayed because an internal server error has occurred" Nothing else.

Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I just faced this error and it was caused by the duplicate static content MIME type in my web.config

Your error was being returned only on the static files - eg images, css, js files were all showing your error.

The way to debug this problem is to look in the web.config under a static content. Here we have the json file extension loaded. This was required on my IIS7 but will kill the app if used on my IIS8 because the json is now pre-loaded at a server level.

<staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
        <mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>

So solution is to just remove any of these mimeType entries one at the time to confirm which are needed for you and which can kill your app!

9 7 4
38,600 points

Related questions

0 votes
1 answer 14 views
14 views
Problem: I am naive to Asp.Net.I am having a weird looking problem where I am trying to open up my ASP.NET MVC application but I am receiving the below ASP.NET error page which says: Server Error in '/' Application. The resource cannot be found. Description: ... unknown reason to me it seems like it is actually searching for the .aspx file. Please guide me if you think I am missing something.
asked Aug 19, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 87 views
87 views
Problem : I want to deploy my ASP.NET application. I have tried deploying my site to IIS, but when I visit it with the browser, it gives me following error : Server Error 500 - Internal server error. There is a problem with the resource you are looking for ... error: The page cannot be displayed because an internal server error has occurred. I want to see the actual issue behind my server error?
asked Dec 7, 2019 alecxe 7.5k points
0 votes
1 answer 10 views
0 votes
2 answers 197 views
197 views
Problem : I am new to ASP MVC and I am facing one error. I am trying to access the Model's Data from the Controller section and I am getting following error when I try to create a Movie as a part of the exercise, whenever I try to click on the link "Create New" I ... am using the Visual Studio 2012 RC I am not sure if this is the root cause of my issue.Please let me know the solution for my issue.
asked Dec 3, 2019 alecxe 7.5k points
1 vote
1 answer 41 views
41 views
Problem : I want to create the simple user control that should be the slider. When I try to add the AjaxToolkit SliderExtender to my user control I usually get below error: Server Error in '/' Application. The Controls collection cannot be modified because ... control and also tried adding the textbox and the slider extender to my placeholder programmatically but I am still facing the above error.
asked Dec 14, 2019 alecxe 7.5k points
1 vote
1 answer 141 views
141 views
Problem : Recently I was told to prepare the C# as I am in pool of new projects. So I have started learning C#. But because of some unknown reason to me now I am facing below error. &ldquo;Make sure that the controller has a parameterless public constructor&rdquo;. As I am very new to C# so I am unable to understand the above error. I need help from someone who can fix the above error.
asked Mar 31, 2020 morrisBson 3.2k points
1 vote
1 answer 43 views
43 views
Problem : While binding the dropdown in MVC, I often face following error: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key country. Please find below my View for your reference : @Html.DropDownList("country", (IEnumerable<SelectListItem>)ViewBag ... .countryid.ToString() }); } ViewBag.mycountrydrop = myitem8; return View(); I do not know how to resolve above error.
asked Dec 28, 2019 alecxe 7.5k points
0 votes
1 answer 311 views
311 views
Problem : I am getting into the C# coding but I am having following issue: I have below code on the UserControl: using MyFirstDataLayer.Section1; public class MyFirstClass { protected void MyFirstMethod { MyFirstClass.MyFirstItem oItem = new MyFirstClass.MyFirstItem(); oItem = ... name instead I am not sure of what this actually means, I did some research but was unable to figure it out.
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 62 views
62 views
Problem: I am completely new to ASP .net core. I guess it is giving me the dependency injection error as shown below: InvalidOperationException: Unable to resolve service for type 'Spinit ... ) Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
asked Aug 17, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 50 views
50 views
Problem : I am trying to up load my site to my host but I am facing following error message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. <compilation debug="true" targetFramework="4.0"> My site is working fine on my local PC but it is not at all opening whenever I am trying to view my site after uploading it to my host. How can I resolve the issue?
asked Dec 3, 2019 alecxe 7.5k points