15

[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.
6
  • Is this a project you created after installing beta8? Or is this a project that was using an older template? Can you share your project.json file? Commented Nov 5, 2015 at 6:29
  • I created the project after installing beta8! Commented Nov 5, 2015 at 6:33
  • Did you also install the Visual Studio extensions from the same place you got beta8? The file is WebToolsExtensionsVS14.msi Commented Nov 5, 2015 at 7:29
  • One other bazaar issue is... I restarted my PC launched the application and the first page loaded. However if I tried to click any of the links on the page it would go back to the same issue. Furthermore if I closed it and tried to run it again.... back to the same problem. Almost as if some other services started? and causing it problems? ^^^ I disabled my anti-virus thinking maybe it was causing issues but didn't seem to fix the problem. I might try uninstalling... Commented Nov 5, 2015 at 7:47
  • @armen.shimoon I've realized this isn't happening just for Beta-8 projects :( Commented Nov 21, 2015 at 9:40

2 Answers 2

11

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 :(

Sign up to request clarification or add additional context in comments.

4 Comments

After a few weeks with the bit defender support team. They have finally resolved this issue. You should now be able to get the latest version and won't have any issues.
It's May of 2016 and BitDefender was still the culprit for me.
Seems like the issue has returned since the RC2 release. I have just submitted a support ticket but last time it took them a few weeks to resolve. It would be good for everyone who has bitdefender to submit a support ticket too. To help speed things up.
Same problem with VS2015 ASP.NET Core project and Bitdefender installed on the machine.
4

Start your application from the command prompt with dnx web or dnx-watch web, or select VS2015 todo so.

Watch the console window for any errors.

HTTP Error 502.3 - Bad Gateway

You will see these errors only on your screen if you use dnx web.

I also got this error. and it was caused by a bug in EF. You can get this error if IIS express can't communicate with kestrel anymore because kestrel stop responding.

Be sure you select the correct dnx version by running dnvm use. to show the list of dnx version available use dnvm list

:\git\Other\Templates\test\Microsoft.Web.Templates.StarterWeb.AI.IndividualAuth.Tests>dnvm list

Active Version         Runtime Architecture OperatingSystem Alias
----- -------         ------- ------------ --------------- -----
  1.0.0-beta8     clr     x64          win
* 1.0.0-beta8     clr     x86          win             b8
  1.0.0-beta8     coreclr x64          win
  1.0.0-beta8     coreclr x86          win
  1.0.0-rc1-16110 coreclr x86          win
  1.0.0-rc1-final clr     x64          win
  1.0.0-rc1-final clr     x86          win             rc1
  1.0.0-rc1-final coreclr x64          win
  1.0.0-rc1-final coreclr x86          win
  1.0.0-rc2-16177 clr     x64          win
  1.0.0-rc2-16177 clr     x86          win             rc2
  1.0.0-rc2-16177 coreclr x64          win
  1.0.0-rc2-16177 coreclr x86          win
  1.0.0-rc2-16219 clr     x86          win
  1.0.0-rc2-16219 coreclr x86          win
  1.0.0-rc2-16222 clr     x86          win             default
  1.0.0-rc2-16222 coreclr x86          win

2 Comments

I've played around with dnx web / dnx-watch but I am not entirely sure if what I am doing is correct? Are you able to specify some step by step instructions?
Did you start the web site by running dnx web?. Open your browser on localhost:5000. If you are using Beta8 then select an beta8 dnx with dnvm use to select your dnx version. To list the available dnx use dnvm list. The dnx must match your application version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.