Wisej 3 - IIS hosting

Answered
0
0

Hi!

How can I host an ASP.NET Core application developed in Wisej 3 on IIS?

Thanks,
Ulisses.

  • You must to post comments
Best Answer
0
0

Ulisses, I tried your app with IIS and the web.config we provide and it works without issues and without changes. The web.config we provide is setup to work with the project as-is. Please note that if you have IIS use the same target directory and run the app it will lock the binaries.

<aspNetCore stdoutLogEnabled=”false” hostingModel=”InProcess” processPath=”bin\Debug\net6.0\WisejWebPageApplication1.exe” arguments=”” />

  • I created an IIS app set to \Downloads\WisejWebPageApplication1\(the root of the project where Default.html is, exactly as before)
  • Created a unmanaged app pool (as explained in the msdn docs) and assigned it to the application
  • Uncommented the lines in web.config (without changing anything)

Works.

If you want to use the publishing tool to consolidate the build, all you need to do is change the processPath in web.config. Also the publishing tools has many other options that you have to be aware of regarding the .NET 6 runtime itself. The documentation is all on msdn, it’s messy and unclear but that’s what it is from Microsoft.

Attachment
  • Luca (ITG)
    Just tried also the publishing tool and it still works without issues with web.config changed to <aspNetCore stdoutLogEnabled=”false” hostingModel=”InProcess” processPath=”dotnet” arguments=”.\WisejWebPageApplication1.dll” stdoutLogFile=”.\logs\stdout” /> by the publishing tool.
  • You must to post comments
0
0

It worked, Luca! It was the unmanaged app pool configuration.

Thank you very much!

  • You must to post comments
0
0

Luca, I followed the following steps:

1 – Install ASP.NET Core Hosting Bundle: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.4-windows-hosting-bundle-installer
2 – Create folder C:\inetpub\wwwroot\wisej3core
3 – Open IIS
4 – Add application ‘wisej3core’
5 – Open attached file (WisejWebPageApplication1.zip)
6 – Publish it
7 – Copy files to C:\inetpub\wwwroot\wisej3core
8 – Uncomment lines in web.config
9 – Open http://127.0.0.1/wisej3core/

  • Luca (ITG)
    You have to create the unmanaged app pool, etc. Follow the instructions on MSDN. Make it work without Wisej first.
  • You must to post comments
0
0

Thank you, Luca. I uncommented the lines, but unfortunately this error is occurring.

Attachment
  • Luca (ITG)
    FileNotFound means you didn’t deploy the dlls correctly. It’s different from ASP.NET, you need to follow the ASP.NET Core instructions. And you cannot simply run it from VS anymore. Try with a plain ASP.NET Core app with 1 HTML page and start from there.
  • You must to post comments
0
0

The same as any ASP.NET Core app.

ASP.NET Core doesn’t use the IIS pipeline anymore. We are updating our deployment documentation, in the meantime you can use any resource that is available for ASP.NET core apps.  https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-6.0&tabs=visual-studio

To make it easier we provide a web.config that is ready for IIS. See the comments in the web.config file. You basically have to enable an IIS handler that plays in between IIS and your ASP.NET Core app. We didn’t change this, it’s all Microsoft doing…

 

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.