Custom App Pool not working

  • Thread starter Thread starter c0d3m0nky
  • Start date Start date
C

c0d3m0nky

Guest
By default all sites of the the same framework will use the same app pool definition from the applicationhost.config. I have 2 ASP .Net 4.6.2 web apps that require an environment variable to be set for a 3rd party process they both use, but I can't just set them globally as they need to be different. Our current solution is that we set them up in IIS then attach to the process when debugging. There is many more weird steps we have to take and troubleshoot when things don't work that I've resolved by switching to IIS Express except for 1. I can't get Visual Studio to honor the app pool setting in the applicationhost.config file

<applicationPools>
<add name="TenantAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
<applicationPoolDefaults managedRuntimeVersion="v4.0">
<processModel loadUserProfile="true" setProfileEnvironment="false" />
</applicationPoolDefaults>
</applicationPools>



<site name="Tenant" id="2">
<application path="/" applicationPool="TenantAppPool">
<virtualDirectory path="/" physicalPath="[full physical path]" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:54399:localhost" />
</bindings>
</site>

However when I start debugging I get a refused connection response and the command line column in task manager shows the following

"C:\Program Files (x86)\IIS Express\iisexpress.exe" /config:"[correct path to applicationhost.config]" /site:"Tenant" /apppool:"Clr4IntegratedAppPool"

Is this a bug or am I missing a step to get Visual Studio to honor the applicationPool attribute in the applicationhost.config?


Running Visual Studio Professional 2019 Version 16.7.5 latest update as of posting

Continue reading...
 
Back
Top