title: How to get the process name iisexpress instead of dotnet in asp.net core 2.2
body: <p>I am learning asp.net core when executing in browser i am getting response header has kestrel instead of iisexpress. I wrote the following code in Startup.cs configure method to get the process name but i'm still getting dotnet i'm not able to get iisexpress.</p>
  
  <pre><code>app.Run(async (context) =&gt; {
    await context.Response.WriteAsync("Hello World!\n");
    await context.Response.WriteAsync(System.Diagnostics.Process.GetCurrentProcess().ProcessName);//dotnet             
  });
  </code></pre>
  
  <p>In Program.cs I add .UseIIS()</p>
  
  <pre><code>public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt; 
    WebHost.CreateDefaultBuilder(args)
      .UseIIS()
      .UseStartup&lt;Startup&gt;();
  </code></pre>
  
  <p>Following is from .csproj file</p>
  
  <pre><code>&lt;PropertyGroup&gt;
  &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
  &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
  &lt;RootNamespace&gt;CookieStore&lt;/RootNamespace&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>Kindly help me to run the project both in InProcess and OutOfProcess.</p>