Azure HTTP Error 500.0 - MVC project - asp.net-mvc

I make a new website + SQL DB on my Azure portal.
I create a new MVC 4 internet project in Visual Studio 2013 Express for Web.
I compile and it runs perfectly in local environment.
I set Azure to log detailed error messages.
I download publishing profile from Azure and deploy.
I get the 500.0 error (Module: AspNetInitializationExceptionModule).
The thing that makes it even more wierd is that a project I have developed on for a longer period of time is deployed without problems - only when making a new website + DB on Azure the problem arises.
Hope that somebody can give me a hint.

Running this in Package Manager did the trick:
Update-Package Microsoft.AspNet.WebApi -reinstall
I got the hint from the following article after having read the eventlog:
Could not load file or assembly 'System.Web.Http 4.0.0 after update from 2012 to 2013

Related

Cannot launch IIS Express for just created project in Visual Studio 2019

I haven't had this problem before.
I have created a blank solution in Visual Studio 2019 and then, I created an ASP.NET Web Application (.NET Framework).
I did nothing else, just run the application.
After rebuilt, this error was shown:
Unable To Launch IIS Web server. Failed to register URL
"https://localhost:44374/" for site "MyProject " application "/".
Error description: Cannot create a file when that file already exists
(0x800700b7)
I have searched for a possible solution but I did not find someone with the same problem.
How can I solve it?
EDIT:
When I launch IIS Express by command line, the same error exists, but only for https URL of the site:

Development Mode Swapping to Development environment will display more detailed information about the error that occurred

When I publish a website with .Net MVC Core 2.0 to run in IIS, it results in error (see below picture) when I try ti register an account,
How to I fix it?
The error you are getting doesn't look like the errors I have had when trying to publish an Asp Core 2.0 site. Have you tried running the site in the powershell using:
dotnet app.dll
The fastest way I find doing this is to go to the directory the dll is stored using file explorer then typing "powershell" in the address bar.
Also do you have all the needed modules and tool kits installed? Here is the microsoft article on the needed items
https://learn.microsoft.com/en-us/aspnet/core/publishing/iis

Running my asp.net 4.5 web application under visual studio 2012 will raise the following error:- HTTP Error 500.0 - Internal Server Error

I am working on an asp.net mvc 4 web application (using .net 4.5). and i am using Visual Studio professional 2012. now when i run the project inside VS-2012 i will get the following error:-
HTTP Error 500.0 - Internal Server Error
Although i am hosting the same application under IIS-8 and it is working well. but if i run the same web application inside Visual studio i will get the above error. i am using windows server 2012 r2.
can anyone adivce why my project is not working when i try running it inside VS? and this problem appeared all of a sudden i mean last week i was able to run the application without any problem..
Thanks
here is the event viewer errors regarding my problem , one related to iis-express, while the other related to VS:-
An application has reported as being unhealthy. The worker process
will now request a recycle. Reason given: An error message detailing
the cause of this specific request failure can be found in the
application event log of the web server. Please review this log entry
to discover what caused this error to occur. . The data is the error.
Windows cannot access the file for one of the following reasons:
there is a problem with the network connection, the disk that the file
is stored on, or the storage drivers installed on this computer; or
the disk is missing. Windows closed the program Microsoft Visual
Studio 2012 because of this error.
Program: Microsoft Visual Studio 2012 File:
Have u checked the "most likely causes". Possibly it is permissions issue. You may need to check startup project or you may need to review your web.config file

How to make BundleTransformer work on Windows Server Core

Ever since we found dotLess stopped working for us our ASP.NET MVC project has been using BundleTransformer for our LESS bundling and minification. We are trying to migrate our CI build agents to use Windows Server Core (headless) and away from Windows Server Standard. When we did this we started receiving Internal Server Errors when trying to hit our pages. This seems to be blowing up inside of BundleTransformer.
We initially were using BundleTransformer with http://www.nuget.org/packages/JavaScriptEngineSwitcher.Msie
From reading this post I thought maybe it was that we were missing the dependency on Internet Explorer.
http://bundletransformer.codeplex.com/discussions/454495
I tried to use the v8 engine switcher and started getting server errors on my Windows Standard setup.
http://www.nuget.org/packages/JavaScriptEngineSwitcher.V8
Has anyone successfully managed to get BundleTransformer working on a Windows Server Core environment? Anything would help. Thank you.
You have installed the Visual C++ Redistributable for Visual Studio 2012 before you install the JavaScriptEngineSwitcher.V8 package?
Give an example of the error message.

After upgrading to MVC 5, my site returns a 404 error when published to production server

I recently upgraded my application from MVC 4/ EF 5 to MVC 5 / EF 6. I also upgraded to Visual Studio 2013 from VS 2012. Everything runs great on the IIS Express but when I publish to my production server via webDeploy, the site returns a 404 for all pages.
I am running IIS 8. There are no entries in my IIS log from today so this is not logging. I see no event alerts either.
I have done some research and performed the following:
Set the System.Web.MVC, System.Web.Routing and
System.Web.Abstractions to use a local copy when publishing. This
had no effect.
I restarted IIS.
I deleted all the files on the production server and re-published.
Thanks so much for your help!
Turns out that the problem had to do with Amazon eleastic ip - nothing wrong with the site or IIS.

Resources