question

ManjulaBangaloreMuniyappa-7580 avatar image
0 Votes"
ManjulaBangaloreMuniyappa-7580 asked SamWu-MSFT answered

upgrade to .NET 6 and deploy on IIS

Hello All,

I upgraded .Net Core2.0 project which was deployed in IIS (Windows server 2012 R2) to .NET 6 .

I installed following sdk on the server.



aspnetcore-runtime-6.0.5-win-x64
dotnet-hosting-6.0.5-win
dotnet-runtime-6.0.5-x64
dotnet-sdk-6.0.300-win-x64
Vc-redist.x64



I upgraded the project to .NET 6 and changed the web.config

<handlers>

   <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

 </handlers>

<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="InProcess">
<environmentVariables />
</aspNetCore>







locally it works fine but when deployed on the server IIS, I am getting 500 error.



HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) Troubleshooting steps:

Check the system event log for error messages

Enable logging the application process' stdout messages

Attach a debugger to the application process and inspect

For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526



Event log shows:

Failed to start application '/LM/W3SVC/1/ROOT/ourapplicationName ', ErrorCode '0x800700c1'.

Process Id: 5272.

File Version: 16.0.22108.5. Description: IIS ASP.NET Core Module V2. Commit: e5f183b656a0e8bc087108130a5a9b54ae94494e

dotnet-csharpwindows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SamWu-MSFT avatar image
0 Votes"
SamWu-MSFT answered

@ManjulaBangaloreMuniyappa-7580

There are many reasons for this error, you can try to fix the problem by setting enable 32 bit Applications to True.

  1. Open IIS.

  2. Go to current server – > Application Pools.

  3. Select the application pool your 32-bit application will run under.

  4. Click Advanced setting and set Enable 32-bit Applications to True.

If this solution can't solve the problem, you can use event log or failed request trace to get more details about 500 error.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.