Run aspnet forms as virtual application under a aspnet core website in IIS

2

I am running an aspnet core website behind IIS. No problems there. I can also add other aspnet core web apps as virtual applications. Again, no problem there. Of course, in both these cases, the application pools are unmanaged.

The problem I'm having is adding an aspnet forms web app as a virtual application under the aforementioned aspnet core app. I'm giving it its own application pool (v4.0) but every time I try to navigate to the virtual app i get the following error:

HTTP Error 502.5 - Process Failure

IIS set up:

Aspnet core Website (app pool - not managed code) OK

    ---Aspnet core virtual app (app pool - not managed code) OK

    ---Aspnet forms virtual app (app pool - v4.0) HTTP Error 502.5 - Process Failure

I've tried researching this but cannot find any relevant help. I would really appreciate some help :-)

Many thanks in advance.

UPDATE

Obviously, this seems to be a difficult one to answer - and I've continued to try to find an answer.

When I look in the event viewer logs (Win 7 - Windows Logs --> Application) I see the following error generated:

Application 'MACHINE/WEBROOT/APPHOST/xxx.xxx/xxx' with physical root 'D:\xxx\xxx\xxx\' failed to start process with commandline '".\xxx.exe" ', ErrorCode = '0x80070002 : 0.

So from this, I believe that although the virtual app has its own application pool (v4.0), the aspnet core process is still being used to launch it. Perosnally, I find this baffling but I do see what seems to be going on now. Maybe this is something MicroSoft are aware of - but it might not be something that will get 'fixed'.

My conclusion is, therefore: you cannot have non-aspnet core virtual apps running under a aspnet core website.

asp.net
iis
asp.net-core
asked on Stack Overflow Mar 29, 2017 by Tony • edited Apr 4, 2017 by Tony

1 Answer

1

So, I'm self-answering this question.

On the face of it, it may have been a stupid question, but I honestly thought that having separate application pools would enable what I suggested above. I wonder how many others are in a similar situation where they are migrating part of their system to aspnet core while needing to keep other parts as they are. If so, there are tough times ahead!!

Answer: you cannot sub host aspnet forms under a aspnet core app, and vice versa - it simply cannot be done.

UPDATE: this can be done - see Stijn's answer

answered on Stack Overflow Apr 4, 2017 by Tony • edited Jun 21, 2018 by Tony

User contributions licensed under CC BY-SA 3.0