Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot launch asp.net core web app in IIS Express

[Edit] The problem is BitDefender anti virus. I followed the instructions on how to install asp.net 5 beta 8. I was able to install all the necessary files without any problem. However every time I selected the web template and attempted to run it using IIS Express it would load for a couple of minutes before displaying an error: HTTP Error 502.3 - Bad Gateway... I tried all the troubleshooting steps in this guide but was unsuccessful. I checked my event log and noticed the following two entries:

The directory specified for caching compressed content C:\Users...Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.

and also:

The description for Event ID 1001 from source HttpPlatformHandler cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Process '4528' started successfully and is listening on port 'x'.

I am not entirely sure if these warnings / information are related to my issue. If anyone can shed some light on this that would be good. All I know is that I have installed the HttpPlatformHandler.

I decided to try another visual studio template (blank template) and strangely enough it worked. I then created a new web application and played around with the project properties and noticed that when I tick the checkbox: "Use Specific Runtime" and select an x64 architecture everything works!! :) however when the checkbox is not ticked (the default) or when the checkbox is selected and the architecture is set to x86 I get the same old error.

How do I get it to run using the default settings? or am I missing something here?

Here is my project.json file

{
  "webroot": "wwwroot",
  "userSecretsId": "aspnet5-WebApplication3-1a336a00-1f3e-432d-928e-f2669c4b0d94",
  "version": "1.0.0-*",

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-beta8",
    "EntityFramework.SqlServer": "7.0.0-beta8",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Google": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta8",
    "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta8",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta8",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta8",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta8",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
    "Microsoft.AspNet.Mvc": "6.0.0-beta8",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
    "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta8",
    "Microsoft.Framework.Logging": "1.0.0-beta8",
    "Microsoft.Framework.Logging.Console": "1.0.0-beta8",
    "Microsoft.Framework.Logging.Debug" : "1.0.0-beta8",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta8"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
  }
}

This is what I've tried since with no success:

  1. Booted Visual Studio in Safe Mode.
  2. Cleared the Visual Studio cache.
  3. Repaired Visual Studio 2015.
  4. Uninstalled and then Reinstalled Visual Studio 2015.
  5. Entirely Formatted my PC and Reinstalled It.

Some other Information:

  • I am running Windows Enterprise 10.
  • I am running Visual Studio 2015 Enterprise.
  • It has worked once or twice but I am unable to identify any pattern as to when.
  • I am just trying to get a visual studio ASP.net 5 MVC out of the box template to run.
  • I've tried different BETA releases and also the RC release.
like image 291
Cool Breeze Avatar asked Nov 04 '15 16:11

Cool Breeze


People also ask

How deploy ASP Net web application in IIS Express?

Make the web project as start up. Run the project . Click on right click on the IIS Express and say show all applications . IIS Express Opens up .

Why IIS Express is not working?

This issue was a point in time issue that occurred when upgrading between the RCs of Visual Studio 2017 that caused IIS Express to get uninstalled. The issue has since been fixed and you upgrading Visual Studio will solve the problem.


1 Answers

So I've finally found the cause of the problem.

I have BitDefender anti virus installed on the computer which for some strange reason it is causing this behavior. As mentioned in the original post I did try disabling it but that didn't work. I had to completely uninstall the software :(

Waste of time :(

like image 154
Cool Breeze Avatar answered Oct 12 '22 23:10

Cool Breeze