MDrivenServerCore in IIS
No edit summary
No edit summary
Line 14: Line 14:
         <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
         <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
       </handlers>
       </handlers>
       <aspNetCore processPath=".\AppCompleteGenericCore.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" '''arguments="-iis=https://localhost/MDRDebug"''' />
       <aspNetCore processPath=".\AppCompleteGenericCore.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" arguments="-iis=https://localhost/MDRDebug"  />
     </system.webServer>
     </system.webServer>
   </location>
   </location>

Revision as of 11:35, 16 October 2023

To host .net core in IIS:

  1. install runtime-aspnetcore-7.0.<lastet>-windows-hosting-bundle-installer
  2. create new apppool (only 1 app per pool), set apppool to "No managed code"
  3. Extract zip of installation into your site folder
  4. Change the web.config:
<aspNetCore processPath=".\AppCompleteGenericCore.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" arguments="-iis=https://localhost/mdrCore1" />  SET THE URL YOUR APP SHOULD USE

Complete web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\AppCompleteGenericCore.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" arguments="-iis=https://localhost/MDRDebug"  />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 3F248237-FF1B-4F4B-9029-DB6440643978-->

When you want to debug from VS - set argument -iis=https://localhost/mdrcore1/ or the name you have , stop apppool, compile, then start apppool and app - navigate via browser

This page was edited 20 days ago on 04/13/2024. What links here